OpenBSD CVS

CVS log for src/sys/netinet/if_ether.c


[BACK] Up to [local] / src / sys / netinet

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.267 / (download) - annotate - [select for diffs], Mon Dec 18 13:30:44 2023 UTC (5 months, 2 weeks ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.266: +3 -2 lines
Diff to previous 1.266 (colored)

Fix race between ifconfig destroy and ARP timer.

After if_detach() has called if_remove(), if_get() will return NULL.
Before if_detach() grabs the net lock, ARP timer can still run.  In
this case arptfree() should just return, instead of triggering an
assertion because ifp is NULL.  The ARP route will be deleted later
when in_ifdetach() calls in_purgeaddr().

OK kn@ mvs@ claudio@

Revision 1.266 / (download) - annotate - [select for diffs], Thu Nov 9 21:45:18 2023 UTC (6 months, 3 weeks ago) by bluhm
Branch: MAIN
Changes since 1.265: +3 -2 lines
Diff to previous 1.265 (colored)

Run arp timeout without kernel lock.

Since cheloha@ has implemented timeout processes that do not grab
the kernel lock, start using TIMEOUT_MPSAFE for arptimer().

OK kn@ mvs@

Revision 1.265 / (download) - annotate - [select for diffs], Fri May 12 12:40:49 2023 UTC (12 months, 3 weeks ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.264: +5 -8 lines
Diff to previous 1.264 (colored)

Access rt_llinfo without checking RTF_LLINFO flag before.  They are
always set together with ARP mutex.
OK mvs@

Revision 1.264 / (download) - annotate - [select for diffs], Sun May 7 16:23:23 2023 UTC (12 months, 3 weeks ago) by bluhm
Branch: MAIN
Changes since 1.263: +2 -2 lines
Diff to previous 1.263 (colored)

I preparation for TSO in software, cleanup the fragment code.  Use
if_output_ml() to send mbuf lists to interfaces.  This can be used
for TSO, fragments, ARP and ND6.  Rename variable fml to ml.  In
pf_route6() split the if else block.  Put the safety check (hlen +
firstlen < tlen) into ip_fragment().  It makes the code correct in
case the packet is too short to be fragmented.  This should not
happen, but other functions also have this logic.
No functional change.  OK sashan@

Revision 1.263 / (download) - annotate - [select for diffs], Tue Apr 25 16:24:25 2023 UTC (13 months, 1 week ago) by bluhm
Branch: MAIN
Changes since 1.262: +17 -14 lines
Diff to previous 1.262 (colored)

Exclusive net lock or mutex arp_mtx protect the llinfo_arp fields.
So kernel lock is only needed for changing the route rt_flags.  In
arpresolve() protect rt_llinfo lookup and llinfo_arp modification
with arp_mtx.  Grab kernel lock for rt_flags reject modification
only when needed.
Tested by Hrvoje Popovski; OK patrick@ kn@

Revision 1.262 / (download) - annotate - [select for diffs], Wed Apr 12 16:14:42 2023 UTC (13 months, 3 weeks ago) by kn
Branch: MAIN
Changes since 1.261: +6 -7 lines
Diff to previous 1.261 (colored)

Pull MP-safe arprequest() out of kernel lock

Defer sending after unlock, reuse `refresh' from similar construct.

OK bluhm

Revision 1.261 / (download) - annotate - [select for diffs], Fri Apr 7 22:02:58 2023 UTC (13 months, 3 weeks ago) by bluhm
Branch: MAIN
Changes since 1.260: +3 -8 lines
Diff to previous 1.260 (colored)

Remove kernel locks from the ARP input path.  Caller if_netisr()
grabs the exclusive netlock and that is sufficent for in_arpinput()
and arpcache().
with kn@; OK mvs@; tested by Hrvoje Popovski

Revision 1.260 / (download) - annotate - [select for diffs], Wed Apr 5 21:51:47 2023 UTC (13 months, 4 weeks ago) by bluhm
Branch: MAIN
Changes since 1.259: +2 -2 lines
Diff to previous 1.259 (colored)

ARP has a sysctl to show the number of packets waiting for an arp
response.  Implement analog sysctl net.inet6.icmp6.nd6_queued for
ND6 to reduce places where mbufs can hide within the kernel.
Atomic operations operate on unsigned int.  Make the type of total
hold queue length consistent.
Use atomic load to read the value for the sysctl.  This clarifies
why no lock around sysctl_rdint() is needed.
OK mvs@ kn@

Revision 1.259 / (download) - annotate - [select for diffs], Wed Apr 5 19:35:23 2023 UTC (13 months, 4 weeks ago) by bluhm
Branch: MAIN
Changes since 1.258: +2 -14 lines
Diff to previous 1.258 (colored)

ARP has a queue of packets that should be sent after name resolution.
ND6 did only hold a single packet.  Unify the logic and add a mbuf
hold queue to struct llinfo_nd6.  This is MP safe and queue limits
are tracked with atomic operations.  New function if_mqoutput() has
common code for ARP and ND6.  ln_saddr6 holds the source address
of the requesting packet.  That is easier than fiddling with mbuf
queue in nd6_ns_output().
OK kn@

Revision 1.258 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:08 2023 UTC (14 months, 3 weeks ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.257: +1 -2 lines
Diff to previous 1.257 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.257 / (download) - annotate - [select for diffs], Sat Mar 4 09:03:34 2023 UTC (15 months ago) by kn
Branch: MAIN
Changes since 1.256: +3 -2 lines
Diff to previous 1.256 (colored)

properly initialise LIST head

This worked because the global head variable is zero-initialised,
but one must not rely on that.

OK mvs claudio

Revision 1.256 / (download) - annotate - [select for diffs], Tue Jan 31 13:41:54 2023 UTC (16 months ago) by mvs
Branch: MAIN
Changes since 1.255: +3 -3 lines
Diff to previous 1.255 (colored)

Remove the last ones route lock references from comments.
No functional change.

Revision 1.255 / (download) - annotate - [select for diffs], Tue Jan 31 11:47:35 2023 UTC (16 months ago) by mvs
Branch: MAIN
Changes since 1.254: +2 -2 lines
Diff to previous 1.254 (colored)

Route lock was reverted, adjust forgotten commentary.
No functional changes.

Revision 1.254 / (download) - annotate - [select for diffs], Sat Jan 28 10:17:16 2023 UTC (16 months ago) by mvs
Branch: MAIN
Changes since 1.253: +7 -7 lines
Diff to previous 1.253 (colored)

Revert the `rt_lock' rwlock(9) diff to fix the recursive
rwlock(9) acquisition.

Reported-by: syzbot+fbe3acb4886adeef31e0@syzkaller.appspotmail.com

Revision 1.253 / (download) - annotate - [select for diffs], Sat Jan 21 17:35:01 2023 UTC (16 months, 1 week ago) by mvs
Branch: MAIN
Changes since 1.252: +10 -10 lines
Diff to previous 1.252 (colored)

Introduce `rt_lock' rwlock(9) and use it instead of kernel lock to
serialize arpcache() and arpresolve(). In fact, net stack already has
sleep points, so the rwlock(9) is better here because we avoid
intersection with the rest of kernel locked paths. Also this new lock
assumed to use to route layer protection instead of netlock.

Hrvoje Popovski had tested this diff and found no visible performance
impact.

ok bluhm@

Revision 1.252 / (download) - annotate - [select for diffs], Wed Dec 7 14:38:29 2022 UTC (17 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.251: +3 -3 lines
Diff to previous 1.251 (colored)

Fix comment by splitting sentance in two. From kn@

Revision 1.251 / (download) - annotate - [select for diffs], Sat Jul 16 15:25:30 2022 UTC (22 months, 2 weeks ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.250: +48 -19 lines
Diff to previous 1.250 (colored)

To fix an KASSERT(la != NULL) panic in ARP, protect the rt_llinfo
field of the route with a mutex.  Keep rt_llinfo not NULL consistent
with RTF_LLINFO flag is set.  Also do not put the mutex in the fast
path.
OK mpi@

Revision 1.250 / (download) - annotate - [select for diffs], Mon Jun 27 20:47:10 2022 UTC (23 months ago) by bluhm
Branch: MAIN
Changes since 1.249: +18 -3 lines
Diff to previous 1.249 (colored)

Push the kernel lock down into arpresolve().  We still need it to
prevent concurrent access to rt_llinfo from rtrequest_delete().
But the common case, when the MAC address is already known, works
without lock.
tested by Hrvoje Popovski; OK mvs@

Revision 1.249 / (download) - annotate - [select for diffs], Mon Jun 27 12:47:07 2022 UTC (23 months ago) by bluhm
Branch: MAIN
Changes since 1.248: +20 -13 lines
Diff to previous 1.248 (colored)

Instead of calling getuptime() all the time in ARP code, do it only
once per function.  This gives a more consistent time value.
OK claudio@ miod@ mvs@

Revision 1.248 / (download) - annotate - [select for diffs], Wed Apr 28 21:21:44 2021 UTC (3 years, 1 month ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.247: +12 -15 lines
Diff to previous 1.247 (colored)

Use mq_delist() to fetch the ARP mbuf hold queue once and feed the
mbuf list to if_output().
OK sashan@ mvs@

Revision 1.247 / (download) - annotate - [select for diffs], Wed Apr 28 10:33:34 2021 UTC (3 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.246: +27 -10 lines
Diff to previous 1.246 (colored)

Document the locking mechanism of the global variables in ARP code.
The global list of ARP llinfo is protected by net lock.  This is
not sufficent when we switch to shared netlock.  Add a mutex for
insertion and removal when net lock is not exclusive.  This is
needed if we want run IP output on multiple CPU.
Put an assertion for shared net lock into arp_rtrequest.
input mvs@; OK sashan@

Revision 1.246 / (download) - annotate - [select for diffs], Mon Apr 26 07:55:16 2021 UTC (3 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.245: +20 -28 lines
Diff to previous 1.245 (colored)

Convert the ARP packet hold queue from mbuf list to mbuf queue which
contins a mutex.  Update la_hold_total with atomic operations.
OK sashan@

Revision 1.245 / (download) - annotate - [select for diffs], Fri Apr 23 21:55:36 2021 UTC (3 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.244: +14 -14 lines
Diff to previous 1.244 (colored)

Setting variable arpinit_done is not MP save if we want to execute
arp_rtrequest() in parallel.  Move initialization to arpinit()
function.
OK kettenis@ mvs@

Revision 1.244 / (download) - annotate - [select for diffs], Fri Apr 23 21:47:32 2021 UTC (3 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.243: +2 -1 lines
Diff to previous 1.243 (colored)

The variable la_hold_total contains the number of packets currently
in the arp queue.  So the sysctl net.inet.ip.arpqueued must be read
only.  In if_ether.c include the header with the declaration of
la_hold_total to ensure that the definition matches.
OK mvs@

Revision 1.243 / (download) - annotate - [select for diffs], Wed Jun 24 22:03:43 2020 UTC (3 years, 11 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.242: +12 -12 lines
Diff to previous 1.242 (colored)

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t.  However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel.  Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@

Revision 1.242 / (download) - annotate - [select for diffs], Thu Nov 7 11:23:23 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.241: +3 -1 lines
Diff to previous 1.241 (colored)

Avoid NULL dereference in arpinvalidate() and nd6_invalidate() by
making RTM_INVALIDATE code path perform same check as RTM_DELETE does.

ok mpi@

Revision 1.241 / (download) - annotate - [select for diffs], Wed Oct 16 10:22:01 2019 UTC (4 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.240: +3 -2 lines
Diff to previous 1.240 (colored)

tsleep(9) -> tsleep_nsec(9)

ok cheloha@, visa@

Revision 1.240 / (download) - annotate - [select for diffs], Wed Jul 17 16:46:18 2019 UTC (4 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.239: +3 -3 lines
Diff to previous 1.239 (colored)

Introduce ETHER_IS_BROADCAST/ANYADDR/EQ() and use them where appropriate.

ok dlg@, sthen@, millert@

Revision 1.239 / (download) - annotate - [select for diffs], Thu Jun 13 08:15:26 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.238: +3 -2 lines
Diff to previous 1.238 (colored)

In arp_rtrequest and nd6_rtrequest return early if the RTF_MPLS flag is
set. These mpls routes use the rt_llinfo structure to store the MPLS label
and would confuse the arp and nd6 code.
OK bluhm@ anton@

Reported-by: syzbot+927e93a362f3ae33dd9c@syzkaller.appspotmail.com

Revision 1.238 / (download) - annotate - [select for diffs], Sun Jan 20 23:43:13 2019 UTC (5 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.237: +32 -32 lines
Diff to previous 1.237 (colored)

Refresh arp entries that are about to expire. Once their life time is less
then 1/8 of net.inet.ip.arptimeout the system will send out a arp request
about every 30 seconds until either the entry is updated or expired.
Not refreshing arp entries will result in packet drop every time a entry
expires which is not ideal for important gateway entries.
Came up with this after a discussion with deraadt@. OK benno@ deraadt@

Revision 1.237 / (download) - annotate - [select for diffs], Fri Nov 30 09:27:56 2018 UTC (5 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.236: +4 -3 lines
Diff to previous 1.236 (colored)

MH_ALIGN -> m_align. In revarprequest() set the ph_rtableid so that
the function is doing the same initialisation as arprequest().
OK bluhm@

Revision 1.236 / (download) - annotate - [select for diffs], Mon Jun 11 08:48:54 2018 UTC (5 years, 11 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.235: +1 -3 lines
Diff to previous 1.235 (colored)

Push the KERNEL_LOCK() inside route_input().

ok visa@, tb@

Revision 1.234.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 18:50:27 2018 UTC (6 years, 1 month ago) by stsp
Branch: OPENBSD_6_3
Changes since 1.234: +9 -4 lines
Diff to previous 1.234 (colored) next main 1.235 (colored)

Merge if_ether.c revision 1.235 to 6.3-stable:

revision 1.235
date: 2018/03/31 15:07:09;  author: stsp;  state: Exp;  lines: +9 -4;  commitid: bhSrWmJtthQEPonD;
When reusing an mbuf to send an ARP response, don't forget to clear
the mbuf packet header. Otherwise, stale mbuf state related to the
ARP request packet might affect the fate of the ARP reply packet.

For example, I observed that for an ARP request to a carp IP, where the
underlying carpdev interface is part of a bridge, ARP replies were always
sent out on the carpdev interface, even if the corresponding ARP request
was received not on the carpdev but on a different bridge member interface.
This happened because the M_PROTO1 mbuf flag was set on the ARP request mbuf
when it left the bridge towards carp, and was still set on the ARP reply,
which reused the same mbuf, sent back towards the bridge. The bridge's loop
detection saw the M_PROTO1 flag and prevented the ARP reply from entering
the bridge, so the reply was instead sent out directly on the carpdev...

ok bluhm@ mpi@

Revision 1.235 / (download) - annotate - [select for diffs], Sat Mar 31 15:07:09 2018 UTC (6 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.234: +9 -4 lines
Diff to previous 1.234 (colored)

When reusing an mbuf to send an ARP response, don't forget to clear
the mbuf packet header. Otherwise, stale mbuf state related to the
ARP request packet might affect the fate of the ARP reply packet.

For example, I observed that for an ARP request to a carp IP, where the
underlying carpdev interface is part of a bridge, ARP replies were always
sent out on the carpdev interface, even if the corresponding ARP request
was received not on the carpdev but on a different bridge member interface.
This happened because the M_PROTO1 mbuf flag was set on the ARP request mbuf
when it left the bridge towards carp, and was still set on the ARP reply,
which reused the same mbuf, sent back towards the bridge. The bridge's loop
detection saw the M_PROTO1 flag and prevented the ARP reply from entering
the bridge, so the reply was instead sent out directly on the carpdev...

ok bluhm@ mpi@

Revision 1.234 / (download) - annotate - [select for diffs], Tue Mar 13 16:42:22 2018 UTC (6 years, 2 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE
Branch point for: OPENBSD_6_3
Changes since 1.233: +25 -31 lines
Diff to previous 1.233 (colored)

Mbuf data is used as struct ether_header before it has been made
continuous.  The length of the hardware and protocol address are
provided in the network packet and have to be checked first.  So
enforce that we only deal with internet over ethernet arp headers
with the address length filled correctly.
found by Maxime Villard;  OK claudio@

Revision 1.233 / (download) - annotate - [select for diffs], Tue Jan 16 10:33:55 2018 UTC (6 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.232: +2 -2 lines
Diff to previous 1.232 (colored)

Recycle IFF_NOTRAILERS into IFF_STATICARP and document ownerhsip
of IFF* flags.

inputs from jmc@, ok bluhm@, visa@

Revision 1.232 / (download) - annotate - [select for diffs], Mon Jan 15 13:48:31 2018 UTC (6 years, 4 months ago) by bluhm
Branch: MAIN
Changes since 1.231: +2 -1 lines
Diff to previous 1.231 (colored)

There was an issue that dynamic path MTU discovery together with
ARP or ND timeout could delete local routes.  Put an assert into
arptfree() and nd6_free() so this cannot happen again.
OK mpi@

Revision 1.231 / (download) - annotate - [select for diffs], Fri Aug 11 21:24:19 2017 UTC (6 years, 9 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.230: +3 -4 lines
Diff to previous 1.230 (colored)

Remove NET_LOCK()'s argument.

Tested by Hrvoje Popovski, ok bluhm@

Revision 1.230 / (download) - annotate - [select for diffs], Sun Jul 30 18:16:14 2017 UTC (6 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.229: +1 -3 lines
Diff to previous 1.229 (colored)

Switch installer to Allotment Routing Table (ART).
Prompted by a bugreport by naddy that IPv6 autoconfiguration is broken
in the installer.
OK mpi, "go for it" deraadt

Revision 1.229 / (download) - annotate - [select for diffs], Fri Jul 28 09:01:09 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.228: +2 -2 lines
Diff to previous 1.228 (colored)

Add an error argument to rtm_send() instead of rerolling it inside
rtdeletemsg().

ok bluhm@

Revision 1.228 / (download) - annotate - [select for diffs], Mon Mar 6 08:56:39 2017 UTC (7 years, 2 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.227: +2 -2 lines
Diff to previous 1.227 (colored)

Prefix functions dealing with routing messages with 'rtm_' and keep
them all in net/rtsock.c.

This allows to easily spot which functions are doing a copyout(9)
when dealing with the routing midlayer.

ok phessler@, bluhm@, dhill@, krw@, claudio@

Revision 1.227 / (download) - annotate - [select for diffs], Mon Dec 19 08:36:49 2016 UTC (7 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.226: +4 -4 lines
Diff to previous 1.226 (colored)

Introduce the NET_LOCK() a rwlock used to serialize accesses to the parts
of the network stack that are not yet ready to be executed in parallel or
where new sleeping points are not possible.

This first pass replace all the entry points leading to ip_output(). This
is done to not introduce new sleeping points when trying to acquire ART's
write lock, needed when a new L2 entry is created via the RT_RESOLVE.

Inputs from and ok bluhm@, ok dlg@

Revision 1.226 / (download) - annotate - [select for diffs], Sun Nov 20 11:46:45 2016 UTC (7 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.225: +1 -3 lines
Diff to previous 1.225 (colored)

Make rtable_iterate(9) mpsafe by using the new SRPL_NEXT(9).

ok dlg@, jmatthew@

Revision 1.225 / (download) - annotate - [select for diffs], Mon Nov 7 09:19:46 2016 UTC (7 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.224: +2 -2 lines
Diff to previous 1.224 (colored)

ARP and NDP timeouts mess with the routing table, so they need a process
context.

Convert them to timeout_set_proc(9).

Revision 1.224 / (download) - annotate - [select for diffs], Thu Sep 15 02:00:18 2016 UTC (7 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.223: +3 -4 lines
Diff to previous 1.223 (colored)

all pools have their ipl set via pool_setipl, so fold it into pool_init.

the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.

most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.

the manpage and subr_pool.c bits i did myself.

ok tedu@ jmatthew@

@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);

Revision 1.223 / (download) - annotate - [select for diffs], Wed Sep 7 09:36:49 2016 UTC (7 years, 8 months ago) by mpi
Branch: MAIN
Changes since 1.222: +5 -10 lines
Diff to previous 1.222 (colored)

Rename rtable_mpath_next() into rtable_iterate() and make it do a proper
reference count.

rtable_iterate() frees the passed ``rt'' and returns the next one on the
multipath list or NULL if there's none.

ok dlg@

Revision 1.222 / (download) - annotate - [select for diffs], Tue Sep 6 00:04:15 2016 UTC (7 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.221: +2 -1 lines
Diff to previous 1.221 (colored)

pool_setipl for various netinet and netinet6 bits

thank you to everyone who helped reviewed these diffs

ok mpi@

Revision 1.221 / (download) - annotate - [select for diffs], Mon Aug 22 16:01:52 2016 UTC (7 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.220: +29 -13 lines
Diff to previous 1.220 (colored)

Make the ``rt_gwroute'' pointer of RTF_GATEWAY entries immutable.

This means that no protection is needed to guarantee that the next hop
route wont be modified by CPU1 while CPU0 is dereferencing it in a L2
resolution functions.

While here also fix an ``ifa'' leak resulting in RTF_GATEWAY being always
invalid.

dlg@ likes it, inputs and ok bluhm@

Revision 1.220 / (download) - annotate - [select for diffs], Thu Jul 14 14:01:40 2016 UTC (7 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.219: +16 -3 lines
Diff to previous 1.219 (colored)

Prevent a use-after-free by not updating an ARP entry that has been
removed from the table.

Currently the storage for L2 addresses is freed when an entry is
removed from the table.  That means that we cannot access this
chunk of memory between RTM_DELETE and rtfree(9).

Note that this doesn't apply to MPLS because the associated storage
is currently released by the last rtfree(9).

ok mikeb@

Revision 1.201.2.1 / (download) - annotate - [select for diffs], Thu Jul 14 11:13:14 2016 UTC (7 years, 10 months ago) by mpi
Branch: OPENBSD_5_9
Changes since 1.201: +17 -3 lines
Diff to previous 1.201 (colored) next main 1.202 (colored)

Backport ARP race fix:

Move ARP processing back to the KERNEL_LOCK()ed task until the race
triggered by updating a cached, but removed from the table, entry is
properly fixed.

Diff from dlg@, prodding deraadt@

Revision 1.219 / (download) - annotate - [select for diffs], Wed Jul 13 16:45:19 2016 UTC (7 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.218: +26 -3 lines
Diff to previous 1.218 (colored)

Move ARP processing back to the KERNEL_LOCK()ed task until the race
triggered by updating a cached, but removed from the table, entry is
properly fixed.

Diff from dlg@, prodding deraadt@

Revision 1.218 / (download) - annotate - [select for diffs], Wed Jul 13 08:40:46 2016 UTC (7 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.217: +2 -2 lines
Diff to previous 1.217 (colored)

Introduce RTF_MULTICAST and flag corresponding IPv6 routes as such
instead of abusing RTF_CLONING.

Fix a leak reporeted by Aaron Riekenberg on misc@, ok sthen@

Revision 1.217 / (download) - annotate - [select for diffs], Mon Jul 11 09:23:06 2016 UTC (7 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.216: +2 -2 lines
Diff to previous 1.216 (colored)

Revert the introduction of ``rt_addr''.

Being able to add route entries without configured addresses is a nice
feature but this is not my fight.  So I'd rather no add another pointer
to ``struct rtentry'' if I'm not removing another one.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Jun 28 17:18:24 2016 UTC (7 years, 11 months ago) by chris
Branch: MAIN
Changes since 1.215: +3 -3 lines
Diff to previous 1.215 (colored)

Add sysctl for arp timers: net.inet.ip.arptimeout (expire timer for resolved
entries) and net.inet.ip.arpdown (expire timer for unresolved entries)

ok mpi@

Revision 1.215 / (download) - annotate - [select for diffs], Tue Jun 14 09:44:41 2016 UTC (7 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.214: +2 -2 lines
Diff to previous 1.214 (colored)

Store the source address associated with a route in its own chunk of
memory.

This will allow to unlink 'sruct rtentry' and 'struct ifaddr' to be able
to add route entries without needing an address.

ok sthen@, visa@, florian@

Revision 1.214 / (download) - annotate - [select for diffs], Fri Jun 10 20:33:29 2016 UTC (7 years, 11 months ago) by vgross
Branch: MAIN
Changes since 1.213: +3 -1 lines
Diff to previous 1.213 (colored)

Add the "llprio" field to struct ifnet, and the corresponding keyword
to ifconfig.

"llprio" allows one to set the priority of packets that do not go through
pf(4), as the case is for arp(4) or bpf(4).

ok sthen@ mikeb@

Revision 1.213 / (download) - annotate - [select for diffs], Mon Jun 6 07:07:11 2016 UTC (7 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.212: +48 -39 lines
Diff to previous 1.212 (colored)

Move logic to send ARP replies to arpreply().

ok florian@, dlg@

Revision 1.212 / (download) - annotate - [select for diffs], Mon Jun 6 07:01:37 2016 UTC (7 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.211: +2 -2 lines
Diff to previous 1.211 (colored)

Get rid of the ``enaddr'' argument of carp_iamatch().

It was only checked in balancing mode, which is currently broken, and is
no longer needed.

Discusssed with bluhm@ and Florian Riehm.

Revision 1.211 / (download) - annotate - [select for diffs], Fri Jun 3 02:56:59 2016 UTC (8 years ago) by dlg
Branch: MAIN
Changes since 1.210: +8 -15 lines
Diff to previous 1.210 (colored)

set rt_expire times against time_uptime, not time_second.

time_second is unix time so it can be affected by clock changes.
time_uptime is monotonic so it isnt affected by clock changes. that
in turn means route expiries wont jump with clock changes if set
against time_uptime.

the expiry is translated into unix time for export to userland though.

ok mpi@

Revision 1.210 / (download) - annotate - [select for diffs], Tue May 31 07:50:34 2016 UTC (8 years ago) by mpi
Branch: MAIN
Changes since 1.209: +21 -42 lines
Diff to previous 1.209 (colored)

Stop creating and inserting a route entry for ARP and ND automagically.

Callers MUST do a route lookup before sending a packet.

Tested by Hrvoje Popovski, ok visa@, bluhm@

Revision 1.209 / (download) - annotate - [select for diffs], Mon May 23 09:23:43 2016 UTC (8 years ago) by mpi
Branch: MAIN
Changes since 1.208: +9 -10 lines
Diff to previous 1.208 (colored)

Pass a 'struct in_addr *' to arplookup() instead of always dereferencing
one.

Revision 1.208 / (download) - annotate - [select for diffs], Mon May 23 09:09:04 2016 UTC (8 years ago) by mpi
Branch: MAIN
Changes since 1.207: +3 -4 lines
Diff to previous 1.207 (colored)

Shorten en error string.

Revision 1.207 / (download) - annotate - [select for diffs], Wed May 18 20:15:14 2016 UTC (8 years ago) by mpi
Branch: MAIN
Changes since 1.206: +11 -24 lines
Diff to previous 1.206 (colored)

Remove some superflous if_get(9)/if_put(9) dances now that ARP input
routines are call directly by ether_input().

ok visa@, dlg@

Revision 1.206 / (download) - annotate - [select for diffs], Wed May 18 08:05:51 2016 UTC (8 years ago) by mpi
Branch: MAIN
Changes since 1.205: +115 -106 lines
Diff to previous 1.205 (colored)

Move the code to update an ARP cache into its own function.

ok visa@

Revision 1.205 / (download) - annotate - [select for diffs], Wed Apr 27 14:47:27 2016 UTC (8 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.204: +2 -3 lines
Diff to previous 1.204 (colored)

Remove unused arguments from rt_checkgate().

Since the rtalloc(9) rewrite no route lookup is done in this function so
there's no need for a destination or a rtable ID.

Revision 1.204 / (download) - annotate - [select for diffs], Wed Mar 30 10:13:14 2016 UTC (8 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.203: +14 -2 lines
Diff to previous 1.203 (colored)

Implement proxy ARP for ART based on mpath support.

Since mpath is not enabled in RAMDISK, proxy ARP won't work there either.

ok bluhm@

Revision 1.203 / (download) - annotate - [select for diffs], Thu Mar 24 07:15:10 2016 UTC (8 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.202: +7 -1 lines
Diff to previous 1.202 (colored)

Ensure that a found proxy ARP entry has the correct flag.

ok bluhm@

Revision 1.202 / (download) - annotate - [select for diffs], Mon Mar 7 11:00:36 2016 UTC (8 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.201: +3 -2 lines
Diff to previous 1.201 (colored)

Do not remove RTF_STATIC L2 entries from the routing table.

This restore the previous behavior without looking at the reference
counter of route entries.

Static entries might not have a cloning route to re-create them and
when their timer expires they were completly gone as found the hardway
by matthieu@.

ok matthieu@

Revision 1.201 / (download) - annotate - [select for diffs], Thu Jan 21 03:34:05 2016 UTC (8 years, 4 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE
Branch point for: OPENBSD_5_9
Changes since 1.200: +2 -5 lines
Diff to previous 1.200 (colored)

remove the arp_inuse and arp_allocated counters

we can get the same info from the arp pool:

# vmstat -m | grep -e ^arp -e ^Name
Name        Size Requests Fail    InUse Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp           56       84    0        6     1     0     1     1     0     8    0

Requests and InUse end up being the same:

# pstat -d d arp_allocated
arp_allocated at 0xffffffff81942084: 84
# pstat -d d arp_inuse
arp_inuse at 0xffffffff81942098: 6

ok bluhm@ claudio@ mpi@

Revision 1.200 / (download) - annotate - [select for diffs], Thu Jan 14 12:41:02 2016 UTC (8 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.199: +5 -2 lines
Diff to previous 1.199 (colored)

Grab the KERNEL_LOCK before delivering a message to the routing socket
when an ARP resolution has been done.

Should hopefully fix the "receive 1" panic reported by benno@ on bugs@.

ok claudio@, phessler@, benno@, bluhm@

Revision 1.199 / (download) - annotate - [select for diffs], Fri Jan 8 13:53:24 2016 UTC (8 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.198: +16 -30 lines
Diff to previous 1.198 (colored)

Get rid of the arp and revarp input queues.

Packets of types ARP and REVARP are now processed in the softnet task,
directly from ether_input() and without holding the KERNEL_LOCK.

Tested by many, ok dlg@

Revision 1.198 / (download) - annotate - [select for diffs], Thu Dec 17 16:05:30 2015 UTC (8 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.197: +1 -9 lines
Diff to previous 1.197 (colored)

rm a bit more trailers code. no longer accept them as alias for ethernet.
ok mpi

Revision 1.197 / (download) - annotate - [select for diffs], Wed Dec 2 22:02:18 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.196: +12 -3 lines
Diff to previous 1.196 (colored)

Since we want to print the interface names in the log messages it is
required to do the if_get/if_put dance around the log() calls. These
were the last users of rt_ifp.
OK mpi@ bluhm@

Revision 1.196 / (download) - annotate - [select for diffs], Wed Dec 2 21:09:06 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.195: +4 -5 lines
Diff to previous 1.195 (colored)

More rt_ifp killing. There checks in in_arpinput() to verify that the
arp packet was recieved on the interface we expected. This is because
multicast and broadcast packets are sometimes forwarded on multiple
local interfaces. So simplify the checks and make them more generic
at the same time (in the SIN_PROXY case). For SIN_PROXY only the
interface holding the proxy arp route will answer to the requests.
OK mpi@

Revision 1.195 / (download) - annotate - [select for diffs], Wed Dec 2 18:38:19 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.194: +1 -6 lines
Diff to previous 1.194 (colored)

There is no reason for this carp magic in arpresolve. rt->rt_ifp has to
be the same as ifp or something is very broken. So remove this including
one more rt_ifp. OK mpi@

Revision 1.194 / (download) - annotate - [select for diffs], Wed Dec 2 16:35:53 2015 UTC (8 years, 6 months ago) by bluhm
Branch: MAIN
Changes since 1.193: +2 -2 lines
Diff to previous 1.193 (colored)

When destroying an interface, we have to wait until all references
are not used anymore.  This has to be done before any interface
fields become invalid.
As the route delete request cannot call if_get() anymore, pass down
the interface.  Split rtrequest_delete() into a separate function
that may take an existing inteface.
OK mpi@

Revision 1.193 / (download) - annotate - [select for diffs], Wed Dec 2 13:29:26 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.192: +2 -2 lines
Diff to previous 1.192 (colored)

Kill the RT_REPORT flag to rtalloc() and stop sending RTM_MISS messages
for failed route lookups. This is something that was maybe useful in the
90is but in this modern times it is just annoying and nothing expect it
anyway. OK mpi@, sthen@

Revision 1.192 / (download) - annotate - [select for diffs], Wed Dec 2 09:28:46 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.191: +3 -6 lines
Diff to previous 1.191 (colored)

Do not delete a conflicting & cloned route entry in the hot path.

Deleting a RTF_CLONED entry without deleting its corresponding RTF_CLONING
entry wont help as it will be cloned the next time arplookup() is executed.

ok claudio@

Revision 1.191 / (download) - annotate - [select for diffs], Tue Dec 1 12:22:18 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.190: +1 -9 lines
Diff to previous 1.190 (colored)

Remove backward compatibility for "older version of routed and gated".

ok millert@, bluhm@

Revision 1.190 / (download) - annotate - [select for diffs], Fri Nov 20 10:51:30 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.189: +1 -6 lines
Diff to previous 1.189 (colored)

This no longer depends on bridge.h, fewer "#ifdef NBRIDGE", say yeah!

Revision 1.189 / (download) - annotate - [select for diffs], Fri Nov 20 10:50:08 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.188: +16 -6 lines
Diff to previous 1.188 (colored)

Fewer uses of rt_ifp.

Tested by and ok sthen@,

Revision 1.188 / (download) - annotate - [select for diffs], Wed Nov 18 13:58:02 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.187: +2 -13 lines
Diff to previous 1.187 (colored)

Factorize the bits to check if a L2 route is connected, wether it is
attached to a carp(4) or bridge(4) member, to not dereference rt_ifp
directly.

ok visa@

Revision 1.187 / (download) - annotate - [select for diffs], Wed Nov 18 13:53:59 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.186: +11 -20 lines
Diff to previous 1.186 (colored)

Make use of srp_enter()/srp_leave() in carp_iamatch() in preparation
for unlocking the ARP input path.

ok dlg@

Revision 1.186 / (download) - annotate - [select for diffs], Fri Nov 13 10:18:04 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.185: +12 -9 lines
Diff to previous 1.185 (colored)

Sore the index of the interface used for revarp instead of a pointer to
its descriptor.  Get rid of a if_ref().

ok dlg@

Revision 1.185 / (download) - annotate - [select for diffs], Fri Nov 6 23:45:21 2015 UTC (8 years, 6 months ago) by bluhm
Branch: MAIN
Changes since 1.184: +11 -20 lines
Diff to previous 1.184 (colored)

In in_arpinput() do not make an extra route lookup to check wether
the sender address is a local IP.  The arplookup() does this route
lookup anyway, so just check its result.
OK mpi@

Revision 1.184 / (download) - annotate - [select for diffs], Thu Nov 5 12:46:23 2015 UTC (8 years, 6 months ago) by bluhm
Branch: MAIN
Changes since 1.183: +36 -50 lines
Diff to previous 1.183 (colored)

In in_arpinput() replace the loops over the interface addresses
with route lookups.  Check wether ARP sender or target protocol
address is a local IP address.  Remove the loop that checks wether
any IPv4 address is configured on the receiving interface.
input, test, OK mpi@

Revision 1.183 / (download) - annotate - [select for diffs], Wed Nov 4 00:16:12 2015 UTC (8 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.182: +4 -14 lines
Diff to previous 1.182 (colored)

use ml_purge to flush the arp hold lists instead of dequeue/free loops.

this is an interesting change because the loops have to decrement
the global hold count too. they looked like this:

	while ((mh = ml_dequeue(&la->la_ml)) != NULL) {
		la_hold_total--;
		m_freem(mh);
	}

because ml_purge returns how many mbufs were freed, we can do this:

	la_hold_total -= ml_purge(&la->la_ml);

ok mpi@ bluhm@

Revision 1.182 / (download) - annotate - [select for diffs], Mon Nov 2 15:05:23 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.181: +8 -15 lines
Diff to previous 1.181 (colored)

Retire ARP load-balacing, thanks for all the fish!

One of the keys of our MP work relies on making OpenBSD's kernel simpler!
In this case turning ARP processing MP-safe is quite complicated due to
the way carp(4) is hooked in arpinput() and nowadays you'd better run
kitchensinkd(9) anyway :)

ok bluhm@, claudio@, reyk@

Revision 1.181 / (download) - annotate - [select for diffs], Mon Nov 2 14:08:54 2015 UTC (8 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.180: +5 -6 lines
Diff to previous 1.180 (colored)

Rename the list of arp entries to arp_list.  This is consistent to
the other arp variables and nd6.  Convert a hand-crafted loop to
LIST_FOREACH_SAFE.
OK mpi@

Revision 1.180 / (download) - annotate - [select for diffs], Sun Nov 1 22:53:34 2015 UTC (8 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.179: +2 -2 lines
Diff to previous 1.179 (colored)

Replace the nd6 llinfo malloc(9) with pool_get(9) like arp does.
OK mpi@

Revision 1.179 / (download) - annotate - [select for diffs], Tue Oct 27 15:22:58 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.178: +1 -6 lines
Diff to previous 1.178 (colored)

RIP arp_ifinit().

Revision 1.178 / (download) - annotate - [select for diffs], Tue Oct 27 10:54:52 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.177: +14 -10 lines
Diff to previous 1.177 (colored)

Move code around for clarity, no functional change.

ok bluhm@

Revision 1.177 / (download) - annotate - [select for diffs], Sun Oct 25 11:58:11 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.176: +2 -4 lines
Diff to previous 1.176 (colored)

Introduce if_rtrequest() the successor of ifa_rtrequest().

L2 resolution depends on the protocol (encoded in the route entry) and
an ``ifp''.  Not having to care about an ``ifa'' makes our life easier
in our MP effort.  Fewer dependencies between data structures implies
fewer headaches.

Discussed with bluhm@, ok claudio@

Revision 1.176 / (download) - annotate - [select for diffs], Thu Oct 22 18:14:53 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.175: +2 -18 lines
Diff to previous 1.175 (colored)

Drop historical comment and an old '#if notyet'.

Revision 1.175 / (download) - annotate - [select for diffs], Thu Oct 22 16:44:54 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.174: +2 -11 lines
Diff to previous 1.174 (colored)

Make sure that the address matching the key (destination) of a route
entry is attached to this entry.

ok phessler@, bluhm@

Revision 1.174 / (download) - annotate - [select for diffs], Thu Oct 22 15:37:47 2015 UTC (8 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.173: +9 -11 lines
Diff to previous 1.173 (colored)

Inspired by satosin(), use inline functions to convert sockaddr dl.
Instead of casts they check wether the incoming object has the
expected type.  So introduce satosdl() and sdltosa() in the kernel.
OK mpi@

Revision 1.173 / (download) - annotate - [select for diffs], Thu Oct 22 13:30:29 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.172: +2 -2 lines
Diff to previous 1.172 (colored)

Do not pass an ``ia'' just to dereference ``ia_ifp''.

ok claudio@, bluhm@, jsg@

Revision 1.172 / (download) - annotate - [select for diffs], Tue Oct 13 10:21:27 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.171: +8 -17 lines
Diff to previous 1.171 (colored)

Simplify arptfree() to no longer look at the route entry's refcounter.

ARP entries with an expired timeout are now removed from the tree even
if they are cached somehwere else.  This also reduces differences with
NDP.

ok bluhm@

Revision 1.171 / (download) - annotate - [select for diffs], Wed Oct 7 08:58:01 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.170: +1 -107 lines
Diff to previous 1.170 (colored)

Move route entry debug helpers where they belong.

Revision 1.170 / (download) - annotate - [select for diffs], Mon Sep 28 08:26:58 2015 UTC (8 years, 8 months ago) by mpi
Branch: MAIN
Changes since 1.169: +35 -25 lines
Diff to previous 1.169 (colored)

Do not manually decrement rt's refcounter in arplookup() and let the
callers rtfree(9) it.

ok bluhm@

Revision 1.169 / (download) - annotate - [select for diffs], Wed Sep 16 06:58:08 2015 UTC (8 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.168: +3 -2 lines
Diff to previous 1.168 (colored)

Fix uninitalized use of variable.
Issue _17 found by Maxime Villard Brainy scanner.
OK bluhm@

Revision 1.168 / (download) - annotate - [select for diffs], Sun Sep 13 17:53:44 2015 UTC (8 years, 8 months ago) by mpi
Branch: MAIN
Changes since 1.167: +5 -5 lines
Diff to previous 1.167 (colored)

There's no point in abstracting ifp->if_output() as long as pf_test()
needs to see lo0 in the output path.

ok claudio@

Revision 1.167 / (download) - annotate - [select for diffs], Sun Sep 13 10:42:32 2015 UTC (8 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.166: +7 -1 lines
Diff to previous 1.166 (colored)

queue revarps to softnet so we can defer processing to a context with
the kernel lock.

"do it" claudio@ mpi@

Revision 1.166 / (download) - annotate - [select for diffs], Sat Sep 12 20:26:07 2015 UTC (8 years, 8 months ago) by mpi
Branch: MAIN
Changes since 1.165: +5 -12 lines
Diff to previous 1.165 (colored)

Stop overwriting the rt_ifp pointer of RTF_LOCAL routes with lo0ifp.

Use instead the RTF_LOCAL flag to loop local traffic back to the
corresponding protocol queue.

With this change rt_ifp is now always the same as rt_ifa->ifa_ifp.

ok claudio@

Revision 1.165 / (download) - annotate - [select for diffs], Thu Sep 10 13:21:41 2015 UTC (8 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.164: +13 -14 lines
Diff to previous 1.164 (colored)

correctly hold and put a reference to the revarp ifp while trying
to get nfs working.

ok claudio@

Revision 1.164 / (download) - annotate - [select for diffs], Wed Sep 9 15:59:19 2015 UTC (8 years, 8 months ago) by mpi
Branch: MAIN
Changes since 1.163: +11 -15 lines
Diff to previous 1.163 (colored)

Rewrite arpproxy() to no longer iterate on the global list of interfaces.

ok claudio@

Revision 1.163 / (download) - annotate - [select for diffs], Wed Sep 9 10:53:54 2015 UTC (8 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.162: +2 -2 lines
Diff to previous 1.162 (colored)

Fix English in comment. OK dlg@

Revision 1.162 / (download) - annotate - [select for diffs], Wed Aug 19 11:05:33 2015 UTC (8 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.161: +32 -31 lines
Diff to previous 1.161 (colored)

KNF

Revision 1.161 / (download) - annotate - [select for diffs], Wed Aug 19 10:50:14 2015 UTC (8 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.160: +17 -15 lines
Diff to previous 1.160 (colored)

Make arplookup() return a pointer to a "struct rtentry".

This is needed for proper refcounting of rtentries and reduce differences
with nd6_lookup().

Tweak and ok bluhm@

Revision 1.160 / (download) - annotate - [select for diffs], Mon Aug 17 09:58:10 2015 UTC (8 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.159: +8 -8 lines
Diff to previous 1.159 (colored)

Use __func__ rather than the function name in log(9) calls to remove
some grep output noise.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Jul 18 15:51:16 2015 UTC (8 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.158: +5 -13 lines
Diff to previous 1.158 (colored)

Abstract the routing table internals behind an rtable_* API.

Code abusing the radix internals for the routing table should now
includes <net/rtable.h> and only deal with "struct rtentry".

Code using a radix tree for another purpose can still include
<net/radix.h>.

Inputs from and ok claudio@, mikeb@

Revision 1.158 / (download) - annotate - [select for diffs], Fri Jul 17 18:35:25 2015 UTC (8 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.157: +6 -9 lines
Diff to previous 1.157 (colored)

Announce an IP address after inserting its corresponding RTF_LOCAL
route and not during the SIOCSIFADDR ioctl.  This way addresses are
not announced when an error occurs.

ok chris@, claudio@

Revision 1.157 / (download) - annotate - [select for diffs], Tue Jul 7 14:22:25 2015 UTC (8 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.156: +14 -14 lines
Diff to previous 1.156 (colored)

Always use "ifp" instead of mixing it with "ac->ac_if" in in_arpinput().

Revision 1.156 / (download) - annotate - [select for diffs], Tue Jun 23 13:20:17 2015 UTC (8 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.155: +7 -6 lines
Diff to previous 1.155 (colored)

Pass a "struct ifnet *" instead of a "struct arpcom *" to arpresolve().

Most of the ARP layer already take an ifp pointer and this makes clear
wich chunks of code are messing with ac_enaddr.

Note that our Ethernet code assume that these pointer are interchangeable
since the first element of the "struct arpcom" is a "struct ifnet".

Revision 1.155 / (download) - annotate - [select for diffs], Tue Jun 16 11:09:40 2015 UTC (8 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.154: +9 -4 lines
Diff to previous 1.154 (colored)

Store a unique ID, an interface index, rather than a pointer to the
receiving interface in the packet header of every mbuf.

The interface pointer should now be retrieved when necessary with
if_get().  If a NULL pointer is returned by if_get(), the interface
has probably been destroy/removed and the mbuf should be freed.

Such mechanism will simplify garbage collection of mbufs and limit
problems with dangling ifp pointers.

Tested by jmatthew@ and krw@, discussed with many.

ok mikeb@, bluhm@, dlg@

Revision 1.154 / (download) - annotate - [select for diffs], Sun Jun 7 01:25:27 2015 UTC (8 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.153: +11 -11 lines
Diff to previous 1.153 (colored)

Replace a bunch of == 0 with == NULL in pointer tests. Nuke some
annoying trailing, leading and embedded whitespace. No change to
.o files.

ok deraadt@

Revision 1.153 / (download) - annotate - [select for diffs], Tue May 26 11:55:34 2015 UTC (9 years ago) by mpi
Branch: MAIN
Changes since 1.152: +3 -15 lines
Diff to previous 1.152 (colored)

Do not create ARP entries for RTF_BROADCAST routes.

This has been done because historically routes to broadcast addresses
were cloned like any ARP entry.  But for obvious reasons, no matching
Ethernet address could ever be resolved.  That's why we played tricks
with the expire timer.

Now that a RTF_BROADCAST route is created per configured IPv4 address,
we need to differenciate duplicated one.  And by not creating an ARP
entry we are allowed to write the IP address in the rt_gateway field,
which prevents MPATH conflicts.

This change is part of a fix to unbreak aliases since the kernel support
multiple connected routes for a subnet.

Found the hardway by djm@, ok claudio@

Revision 1.152 / (download) - annotate - [select for diffs], Fri May 15 12:00:57 2015 UTC (9 years ago) by claudio
Branch: MAIN
Changes since 1.151: +1 -15 lines
Diff to previous 1.151 (colored)

Allow multiple connected/interface routes to exist at the same time.
Use the existing multipath code. Switch away from using the ifa address
when making the cloning route and instead put a dummy sockaddr_dl route
in. With this it is possible to use the same network on multiple interfaces
at the same time. So if wireless and ethernet share the same network
the system will use the wired connection as long as there is link.
Still missing is builtin proxy-arp for the other interface IPs to allow
hitless failover.
OK mpi@

Revision 1.151 / (download) - annotate - [select for diffs], Wed Apr 22 04:12:22 2015 UTC (9 years, 1 month ago) by jsg
Branch: MAIN
Changes since 1.150: +2 -2 lines
Diff to previous 1.150 (colored)

Init rt to NULL in arpresolve().  Not a problem in practice
as la will be NULL when rt is uninitialised which should cause
the function to return, but makes the code easier to follow.

ok mpi@ miod@

Revision 1.150 / (download) - annotate - [select for diffs], Fri Apr 10 13:58:20 2015 UTC (9 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.149: +6 -10 lines
Diff to previous 1.149 (colored)

replace the use of ifqueues for most input queues serviced by netisr
with niqueues.

this change is so big because there's a lot of code that takes
pointers to different input queues (eg, ether_input picks between
ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through
to code to enqueue packets against the pointer. if i changed only
one of the input queues id have to add sepearate code paths, one
for ifqueues and one for niqueues in each of these places

by flipping all these input queues at once i can keep the currently
common code common.

testing by mpi@ sthen@ and rafael zalamena
ok mpi@ sthen@ claudio@ henning@

Revision 1.149 / (download) - annotate - [select for diffs], Tue Mar 24 12:58:43 2015 UTC (9 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.148: +29 -44 lines
Diff to previous 1.148 (colored)

Convert hand-rolled mbuf list used to store packets until ARP
resolution is completed to ml_init(9) API.

Tested by kspillner@, inputs & ok dlg@

Revision 1.148 / (download) - annotate - [select for diffs], Sat Mar 14 17:13:44 2015 UTC (9 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.147: +8 -1 lines
Diff to previous 1.147 (colored)

Check for the size of the supposed destination address when constructing
the Ethernet frame.  Prevent an overflow reported by Henk Jan Agteresch
on bugs@.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:51 2015 UTC (9 years, 2 months ago) by jsg
Branch: MAIN
Changes since 1.146: +1 -2 lines
Diff to previous 1.146 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.146 / (download) - annotate - [select for diffs], Wed Feb 11 23:34:43 2015 UTC (9 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.145: +2 -2 lines
Diff to previous 1.145 (colored)

Do not store the key and the gateway of a route entry in the same chunk
of memory.

The key (destination) is only set once, when the route is inserted in
the routing table, and does not need to change afterward.  The gateway
might change and rt_setgate() will do all the checks for you.

ok claudio@

Revision 1.145 / (download) - annotate - [select for diffs], Sat Feb 7 04:01:11 2015 UTC (9 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.144: +10 -1 lines
Diff to previous 1.144 (colored)

Print a different error message if the route entry supposed to contain
ARP information is of a different kind.

ok sthen@, claudio@

Revision 1.144 / (download) - annotate - [select for diffs], Thu Feb 5 03:01:03 2015 UTC (9 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.143: +2 -10 lines
Diff to previous 1.143 (colored)

Convert various rtrequest1(RTM_DELETE,...) calls to rtdeletemsg(9).

This unify some code and notify userland for free.

blambert@ agrees, ok bluhm@

Revision 1.143 / (download) - annotate - [select for diffs], Wed Jan 28 22:10:13 2015 UTC (9 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.142: +2 -9 lines
Diff to previous 1.142 (colored)

Revert rtdeletemsg conversion.  It was not ok'd, I misunderstood bluhm@'s
email.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Jan 26 11:36:38 2015 UTC (9 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.141: +9 -2 lines
Diff to previous 1.141 (colored)

Do not always try to rtfree(9) route entries inside rtdeletemsg(9).

Instead check the error code returned by this function and let the
caller free the route entry when appropriate.

ok bluhm@

Revision 1.141 / (download) - annotate - [select for diffs], Tue Jan 13 12:16:18 2015 UTC (9 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.140: +6 -3 lines
Diff to previous 1.140 (colored)

Only notify userland about resolved ARP entries if the Ethernet address
changed or if we asked for it.

Should reduce the RTM_RESOLVE storm seeing by claudio@

With inputs from and ok mikeb@

Revision 1.140 / (download) - annotate - [select for diffs], Thu Jan 8 14:29:18 2015 UTC (9 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.139: +23 -13 lines
Diff to previous 1.139 (colored)

Factorize various duplicated chunks of (old and horrible) code, checking
for the validity of a given outgoing route entry into a single function.

This change is inspired from FreeBSD r111767.  The function introduced
here, rt_checkgate(), should hopefully die in a near future.  Why should
it die?  Well, it is way too late to do such validity checks: if your
kernel can ends up in ether_output() with an invalid route, please do
not let it try to find a new one that might do the job.

Go read this function if you're wondering why you're getting messages
like:

"arpresolve: X.X.X.X: route without link local address"

Since this horrible logic has survived 20 years of copy & past and small
modifications for workarounds without a single clear commit message, let's
assume it is full of dragons and try to play safe.  This factorization is
not intended to change any behavior.

With much inputs from bluhm@, tested by weerd@ and florian@ on setups
with p2p IPv6 interfaces.

ok bluhm@, benno@, florian@

Revision 1.139 / (download) - annotate - [select for diffs], Fri Dec 19 17:14:40 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.138: +1 -3 lines
Diff to previous 1.138 (colored)

unifdef INET in net code as a precursor to removing the pretend option.
long live the one true internet.
ok henning mikeb

Revision 1.138 / (download) - annotate - [select for diffs], Fri Dec 5 15:50:04 2014 UTC (9 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.137: +2 -1 lines
Diff to previous 1.137 (colored)

Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.

ok mikeb@, krw@, bluhm@, tedu@

Revision 1.137 / (download) - annotate - [select for diffs], Sat Nov 1 21:40:38 2014 UTC (9 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.136: +6 -3 lines
Diff to previous 1.136 (colored)

Rename rtalloc1() into rtalloc(9) and convert its flags to only enable
functionnality instead of a mix of enable/disable.

ok bluhm@, jca@

Revision 1.136 / (download) - annotate - [select for diffs], Wed Sep 3 08:53:54 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.135: +15 -2 lines
Diff to previous 1.135 (colored)

Make sure broadcast entries won't be freed by the arp timer so we can
use them for address lookups.

While here do let in_arpinput() overwrite local or broadcast entries.

ok mikeb@, florian@

Revision 1.135 / (download) - annotate - [select for diffs], Tue Aug 26 15:09:26 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.134: +1 -13 lines
Diff to previous 1.134 (colored)

Revert the addition of broadcast addresses, it apparently also corrupts
the tree.   Found by millert@.

Revision 1.134 / (download) - annotate - [select for diffs], Tue Aug 19 12:49:41 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.133: +13 -1 lines
Diff to previous 1.133 (colored)

When a local route entry is added for an ifa having a broadcast address,
also adds a broadcast entry flagged with RTF_BROADCAST.

Prior to this change broadcast entries were simple clonned ARP entries,
that would be deleted once their timer expired since they would always
be incomplete.

With this change they are now persistant and identifiable with a new flag.

Committing early to be able to deal with any potential fallout before we
start relying on this.

ok florian@, mikeb@, henning@

Revision 1.133 / (download) - annotate - [select for diffs], Mon Aug 11 13:51:07 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

Use the RTF_LOCAL flag instead of abusing the RTF_LLINFO flag when
adding local route entries.

This hack made sense when we didn't have the RTF_LOCAL flag, but since
some months it is set on every local route.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Aug 11 11:50:41 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.131: +8 -3 lines
Diff to previous 1.131 (colored)

Convert ARP llinfo allocation to pool(9).

ok henning@, dlg@

Revision 1.131 / (download) - annotate - [select for diffs], Sat Jul 12 18:44:23 2014 UTC (9 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.130: +2 -2 lines
Diff to previous 1.130 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.130 / (download) - annotate - [select for diffs], Sat Jul 12 14:26:00 2014 UTC (9 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.129: +5 -3 lines
Diff to previous 1.129 (colored)

Always create a local route for every configured IPv4 address on the
machine and restore the original behavior of RTM_ADD and RTM_DELETE
by always generating one message per locally configured address.

This time, make sure the local route is removed during an address change,
since at least pppoe(4) do some funky magics with wildcard addresses that
might corrupt the routing tree, as found by naddy@

Also do not add a local route if the specified address is 0.0.0.0, to
prevent a tree corruption, as found by guenther@.

Putting this in now so that it gets tested, claudio@ agrees.  Please
contact me if you find any route-related regression caused by this
change.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jun 16 19:47:21 2014 UTC (9 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.128: +3 -5 lines
Diff to previous 1.128 (colored)

Revert "Always create a local route for every configured IPv4 address",
it introduces a regression with default routes & p2p interfaces.

Problem reported by naddy@

Revision 1.128 / (download) - annotate - [select for diffs], Wed Jun 11 11:30:03 2014 UTC (9 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.127: +5 -3 lines
Diff to previous 1.127 (colored)

Always create a local route for every configured IPv4 address on the
machine and restore the original behavior of RTM_ADD and RTM_DELETE
by always generating one message per locally configured address.

Tested by krw@, jca@ and florian@

Revision 1.127 / (download) - annotate - [select for diffs], Wed May 7 08:14:59 2014 UTC (10 years ago) by mpi
Branch: MAIN
Changes since 1.126: +3 -21 lines
Diff to previous 1.126 (colored)

Kill the {nd6_,}useloopback buttons, using the loopback interface for
local traffic is not optional.

ok mikeb@, stsp@, jca@

Revision 1.126 / (download) - annotate - [select for diffs], Mon May 5 11:44:33 2014 UTC (10 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.125: +7 -1 lines
Diff to previous 1.125 (colored)

Use a custom ifa_rtrequest function for point-to-point interfaces
instead of relying on hacks in nd6_rtrequest() to add a route to
loopback for each address configured on such interfaces.

While here document that abusing lo0 for local traffic is not safe
for interfaces in a non-default rdomain.

Tested by claudio@, jca@ and sthen@, ok sthen@

Revision 1.125 / (download) - annotate - [select for diffs], Mon Apr 14 09:06:42 2014 UTC (10 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.124: +4 -4 lines
Diff to previous 1.124 (colored)

"struct pkthdr" holds a routing table ID, not a routing domain one.
Avoid the confusion by using an appropriate name for the variable.

Note that since routing domain IDs are a subset of the set of routing
table IDs, the following idiom is correct:

	rtableid = rdomain

But to get the routing domain ID corresponding to a given routing table
ID, you must call rtable_l2(9).

claudio@ likes it, ok mikeb@

Revision 1.124 / (download) - annotate - [select for diffs], Thu Apr 10 14:36:25 2014 UTC (10 years, 1 month ago) by mikeb
Branch: MAIN
Changes since 1.123: +2 -6 lines
Diff to previous 1.123 (colored)

notify userland when arp entry is removed;  ok mpi

Revision 1.123 / (download) - annotate - [select for diffs], Thu Mar 27 10:39:23 2014 UTC (10 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.122: +1 -2 lines
Diff to previous 1.122 (colored)

Stop mixing interface address flags with routing entry ones.

Instead of always copying ifa_flags to the routing entry flags when
creating a route by calling rtinit(), explicitly pass the RTF_CLONING
flag when required.  This means ifa_flags are now *only* used to check
if an address has an associated route that was created by the kernel
auto-magically.

ok benno@

Revision 1.122 / (download) - annotate - [select for diffs], Tue Mar 18 14:55:49 2014 UTC (10 years, 2 months ago) by mikeb
Branch: MAIN
Changes since 1.121: +2 -1 lines
Diff to previous 1.121 (colored)

Notify userland via the routing socket when ARP resolution completes;
discussed with claudio@ at n2k14, ok mpi

Revision 1.121 / (download) - annotate - [select for diffs], Tue Mar 18 10:47:34 2014 UTC (10 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.120: +2 -2 lines
Diff to previous 1.120 (colored)

Rename rt_gettable() into rtable_get(), swap its arguments to be
coherent with the existing rtable_* functions and document it.

While here fix some other manpage glitches pointed out by jmc@.

Revision 1.120 / (download) - annotate - [select for diffs], Tue Mar 11 10:31:29 2014 UTC (10 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.119: +14 -17 lines
Diff to previous 1.119 (colored)

Remove gratuitous differences between arp and nd6 rtrequests,
no functional change.

ok jca@

Revision 1.119 / (download) - annotate - [select for diffs], Mon Mar 10 12:21:35 2014 UTC (10 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored)

if_lladdr -> if_sadl, no functional change.

ok mikeb@

Revision 1.118 / (download) - annotate - [select for diffs], Wed Jan 22 06:28:09 2014 UTC (10 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.117: +1 -3 lines
Diff to previous 1.117 (colored)

Remove genmask support from the kernel. rtmsgs with RTA_GENMASK set will
now cause a EINVAL. The RTA_GENMASK and RTAX_GENMASK defines are kept for
compatibility reasons.
OK benno@ and agreed by dlg@

Revision 1.117 / (download) - annotate - [select for diffs], Fri Jan 10 14:29:08 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.116: +7 -7 lines
Diff to previous 1.116 (colored)

replace the rest of the obsolete radix macros
sprinkle 0 -> NULL where obvious
ok millert mpi

Revision 1.116 / (download) - annotate - [select for diffs], Thu Jan 9 21:57:52 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.115: +5 -4 lines
Diff to previous 1.115 (colored)

replace Bcopy macro with memmove and memcpy. ok mpi

Revision 1.115 / (download) - annotate - [select for diffs], Thu Jan 9 06:29:05 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.114: +11 -11 lines
Diff to previous 1.114 (colored)

bzero/bcmp -> memset/memcmp. ok matthew

Revision 1.114 / (download) - annotate - [select for diffs], Tue Dec 31 03:24:44 2013 UTC (10 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.113: +28 -37 lines
Diff to previous 1.113 (colored)

bcopy -> memcpy. reviewed with one fix from matthew

Revision 1.113 / (download) - annotate - [select for diffs], Wed Nov 27 12:25:30 2013 UTC (10 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.112: +2 -3 lines
Diff to previous 1.112 (colored)

Since r1.106 we have a local variable referencing the receiving interface,
use it instead of dereferencing the mbuf once again. No functional change.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Nov 21 09:08:38 2013 UTC (10 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored)

Replace the last usage of IA_SIN() and kill this macro.

ok henning@, sthen@, mikeb@, deraadt@

Revision 1.111 / (download) - annotate - [select for diffs], Mon Nov 11 09:15:34 2013 UTC (10 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.110: +23 -13 lines
Diff to previous 1.110 (colored)

Replace most of our formating functions to convert IPv4/6 addresses from
network to presentation format to inet_ntop().

The few remaining functions will be soon converted.

ok mikeb@, deraadt@ and moral support from henning@

Revision 1.110 / (download) - annotate - [select for diffs], Thu Oct 31 18:10:21 2013 UTC (10 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

Convert the route expire timestamp in kernel and routing message
to 64 bit.  Increase the routing message version from 4 to 5.  Add
a small compatibility layer that allows to set routes with old user
land and new kernel.  Old kernel with new user land does not work.

The compatibility layer ist not perfect, but it allows to configure
addresses with old ifconfig and new kernel.  Route get also works
in this setup.  dhclient hangs as messages for interface address
changes with old version are not generated.

OK claudio@

Revision 1.109 / (download) - annotate - [select for diffs], Mon Oct 28 12:33:32 2013 UTC (10 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.108: +2 -31 lines
Diff to previous 1.108 (colored)

tedu FDDI support and the 3 flavors the driver for DEC devices, even
miod@ cannot find two boards using the same media.

With precious punctuation review from guenther@, thanks!

ok deraadt@, henning@

Revision 1.108 / (download) - annotate - [select for diffs], Mon Oct 14 16:06:33 2013 UTC (10 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

By passing invalid values in the routing message, root could crash
the kernel from user land.  Add a null pointer check as quick fix.
OK blambert@ claudio@

Revision 1.107 / (download) - annotate - [select for diffs], Tue Sep 3 10:25:32 2013 UTC (10 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.106: +11 -11 lines
Diff to previous 1.106 (colored)

Use satosin() rather than the local SIN macro, no functional change.

ok mikeb@

Revision 1.106 / (download) - annotate - [select for diffs], Thu Aug 29 13:24:43 2013 UTC (10 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.105: +35 -38 lines
Diff to previous 1.105 (colored)

Iterate over the interface's address list instead of the global list.

ok bluhm@, mikeb@

Revision 1.105 / (download) - annotate - [select for diffs], Wed Aug 28 06:58:57 2013 UTC (10 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.104: +2 -2 lines
Diff to previous 1.104 (colored)

Remove unused argument from *rtrequest()

ok krw@, mikeb@

Revision 1.104 / (download) - annotate - [select for diffs], Fri Aug 9 06:01:52 2013 UTC (10 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.103: +4 -3 lines
Diff to previous 1.103 (colored)

Constify the default null sockaddr_dl, no functional change.

ok mikeb@

Revision 1.103 / (download) - annotate - [select for diffs], Thu Aug 1 08:27:43 2013 UTC (10 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.102: +3 -2 lines
Diff to previous 1.102 (colored)

Do not use a static variable to perform a lookup.  While this
is perfectly ok for the moment because there might be at most
one caller at a time, it wont be so as soon as this part of
the network stack is run in parallel.

ok henning@, mikeb@

Revision 1.102 / (download) - annotate - [select for diffs], Thu Jul 4 08:22:19 2013 UTC (10 years, 11 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.101: +30 -1 lines
Diff to previous 1.101 (colored)

Rewrite the function used to determine if we do proxy ARP for one of
our addresses to reuse arplookup() and do only one list iteration.

Looks ok to claudio@, ok mikeb@

Revision 1.101 / (download) - annotate - [select for diffs], Thu Mar 28 23:10:05 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.100: +2 -1 lines
Diff to previous 1.100 (colored)

code that calls timeout functions should include timeout.h
slipped by on i386, but the zaurus doesn't automagically pick it up.
spotted by patrick

Revision 1.100 / (download) - annotate - [select for diffs], Thu Mar 28 16:45:16 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.99: +1 -3 lines
Diff to previous 1.99 (colored)

no need for a lot of code to include proc.h

Revision 1.99 / (download) - annotate - [select for diffs], Thu Mar 28 00:32:11 2013 UTC (11 years, 2 months ago) by bluhm
Branch: MAIN
Changes since 1.98: +2 -2 lines
Diff to previous 1.98 (colored)

Unfortunately the satosin, sintosa, ifatoia, satosin6, sin6tosa,
ifatoia6 macros do not check the source type.  They just cast
anything.  Remove needless casts and do not use those macros if the
source type does not match.  Remove duplicate defines.
No binary change.  OK kettenis@ krw@

Revision 1.98 / (download) - annotate - [select for diffs], Fri Mar 22 01:41:12 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.97: +2 -3 lines
Diff to previous 1.97 (colored)

simple replacement of LIST_END with NULL. ok mpi

Revision 1.97 / (download) - annotate - [select for diffs], Thu Mar 7 09:03:16 2013 UTC (11 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored)

Remove the IFAFREE() macro, the ifafree() function it was calling already
check for the reference counter.

ok mikeb@, miod@, pelikan@, kettenis@, krw@

Revision 1.96 / (download) - annotate - [select for diffs], Thu Oct 18 00:36:22 2012 UTC (11 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.95: +26 -17 lines
Diff to previous 1.95 (colored)

Move revarp code into #ifdef NFSCLIENT; saving space on some media.
Resurrect the rather silly "unplug my network device while I am
doing nfs diskless revarp" safety code which was disabled due to
a missing "ether.h" include, found by jsg
ok jsg

Revision 1.95 / (download) - annotate - [select for diffs], Fri Oct 5 17:17:04 2012 UTC (11 years, 7 months ago) by camield
Branch: MAIN
Changes since 1.94: +13 -4 lines
Diff to previous 1.94 (colored)

Point an interface directly to its bridgeport configuration, instead
of to the bridge itself.  This is ok, since an interface can only be part
of one bridge, and the parent bridge is easy to find from the bridgeport.

This way we can get rid of a lot of list walks, improving performance
and shortening the code.

ok henning stsp sthen reyk

Revision 1.94 / (download) - annotate - [select for diffs], Fri Oct 5 12:30:43 2012 UTC (11 years, 7 months ago) by camield
Branch: MAIN
Changes since 1.93: +10 -8 lines
Diff to previous 1.93 (colored)

missing NCARP define and fix indent

Revision 1.93 / (download) - annotate - [select for diffs], Sun Sep 18 11:17:58 2011 UTC (12 years, 8 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

Fix various format string types to as a minimum match the width of the
variables being processed.
ok bluhm@ henning@

Revision 1.92 / (download) - annotate - [select for diffs], Wed Jul 6 02:42:28 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

cosnistently use IFQ_SET_MAXLEN, surfaced in a discussion with + ok bluhm

Revision 1.91 / (download) - annotate - [select for diffs], Tue Jul 5 23:15:15 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.90: +3 -2 lines
Diff to previous 1.90 (colored)

fix bizarre and mostly useless initialization of an ifqueue in BSS that
again makes assumptions of the ifqueue internals, ok ryan claudio

Revision 1.90 / (download) - annotate - [select for diffs], Tue Jul 5 21:40:38 2011 UTC (12 years, 11 months ago) by dhill
Branch: MAIN
Changes since 1.89: +20 -48 lines
Diff to previous 1.89 (colored)

ansify

ok claudio@

Revision 1.89 / (download) - annotate - [select for diffs], Mon Jun 27 13:01:51 2011 UTC (12 years, 11 months ago) by camield
Branch: MAIN
Changes since 1.88: +3 -1 lines
Diff to previous 1.88 (colored)

Mark ARP request broadcasts with M_BCAST in the mbuf flags.

Fixes a case in bridge_output() where ARP requests are not broadcast
on interfaces without the discovery flag.

ok claudio deraadt

Revision 1.88 / (download) - annotate - [select for diffs], Thu Jul 22 00:41:55 2010 UTC (13 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored)

remove unused variable

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jun 28 18:50:37 2010 UTC (13 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.86: +6 -8 lines
Diff to previous 1.86 (colored)

Add the rtable id as an argument to rn_walktree(). Functions like
rt_if_remove_rtdelete() need to know the table id to be able to correctly
remove nodes.
Problem found by Andrea Parazzini and analyzed by Martin Pelikán.
OK henning@

Revision 1.86 / (download) - annotate - [select for diffs], Fri May 7 13:33:16 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Start cleaning up the mess called rtalloc*. Kill rtalloc2, make rtalloc1
accept flags for report and nocloning. Move the rtableid into struct route
(with a minor twist for now) and make a few more codepathes rdomain aware.
Appart from the pf.c and route.c bits the diff is mostly mechanical.
More to come...
OK michele, henning

Revision 1.85 / (download) - annotate - [select for diffs], Tue Apr 6 18:16:31 2010 UTC (14 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored)

spacing

Revision 1.84 / (download) - annotate - [select for diffs], Mon Feb 8 13:32:50 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.83: +1 -10 lines
Diff to previous 1.83 (colored)

arpioctl() is not used sore remove it. Found by Gleydson Soares.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Jan 13 05:27:19 2010 UTC (14 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.82: +1 -37 lines
Diff to previous 1.82 (colored)

Remove special bridge code in in_arpinput() this is no longer needed since
we now correctly broadcast packets to all local ports.
OK deraadt@

Revision 1.82 / (download) - annotate - [select for diffs], Tue Nov 3 10:59:04 2009 UTC (14 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

rtables are stacked on rdomains (it is possible to have multiple routing
tables on top of a rdomain) but until now our code was a crazy mix so that
it was impossible to correctly use rtables in that case. Additionally pf(4)
only knows about rtables and not about rdomains. This is especially bad when
tracking (possibly conflicting) states in various domains.
This diff fixes all or most of these issues. It adds a lookup function to
get the rdomain id based on a rtable id. Makes pf understand rdomains and
allows pf to move packets between rdomains (it is similar to NAT).
Because pf states now track the rdomain id as well it is necessary to modify
the pfsync wire format. So old and new systems will not sync up.
A lot of help by dlg@, tested by sthen@, jsg@ and probably more
OK dlg@, mpf@, deraadt@

Revision 1.81 / (download) - annotate - [select for diffs], Sat Oct 17 12:20:17 2009 UTC (14 years, 7 months ago) by mpf
Branch: MAIN
Changes since 1.80: +31 -18 lines
Diff to previous 1.80 (colored)

Allow us to accept gratuitous ARP requests in cases where the
link-route points over the carp interface. (IP-less carpdev)
The descision whether to drop an ARP query is now expressed with
a goto out; rather than a second check later, which prevented
the carpdev case to work. Also add some comments to make
in_arpinput() easier to understand.
OK henning, markus.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Jun 5 00:05:22 2009 UTC (15 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.79: +20 -10 lines
Diff to previous 1.79 (colored)

Initial support for routing domains. This allows to bind interfaces to
alternate routing table and separate them from other interfaces in distinct
routing tables. The same network can now be used in any doamin at the same
time without causing conflicts.
This diff is mostly mechanical and adds the necessary rdomain checks accross
net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6.
input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@

Revision 1.79 / (download) - annotate - [select for diffs], Wed Dec 24 08:26:27 2008 UTC (15 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.78: +5 -2 lines
Diff to previous 1.78 (colored)

Fix two mbuf leaks in arpresolve. The first one happens on IFF_NOARP
interfaces and is probably never hit. The other one happens when the
number of packets on the arp hold queue is exceeded. If arpresolve()
returns NULL the mbuf must be on the hold queue or freed.
Fixes the mbuf leak seen by dlg@. Found with dlg@'s insane mbuf leak
diff. OK dlg@

Revision 1.78 / (download) - annotate - [select for diffs], Fri Oct 31 21:08:33 2008 UTC (15 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.77: +28 -16 lines
Diff to previous 1.77 (colored)

Be way more strict in the number of packets allowed to be queued in the
arp layer. With a lot of input from deraadt@.
OK dlg@, looks good gollo@ + deraadt@

Revision 1.77 / (download) - annotate - [select for diffs], Thu Oct 30 09:39:05 2008 UTC (15 years, 7 months ago) by gollo
Branch: MAIN
Changes since 1.76: +57 -18 lines
Diff to previous 1.76 (colored)

Arpresolve could loose few packets during resolving an ethernet
address. This cvs commit introduces a queue that buffers a small
burst of packets and resending the packets in correct order when
the ethernet address is resolved. Code written by Armin Wolfermann
<aw@osn.de>.

OK: claudio@ henning@

Revision 1.76 / (download) - annotate - [select for diffs], Wed Sep 10 14:01:23 2008 UTC (15 years, 8 months ago) by blambert
Branch: MAIN
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

Convert timeout_add() calls using multiples of hz to timeout_add_sec()

Really just the low-hanging fruit of (hopefully) forthcoming timeout
conversions.

ok art@, krw@

Revision 1.75 / (download) - annotate - [select for diffs], Fri Jun 6 13:29:43 2008 UTC (16 years ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.74: +1 -2 lines
Diff to previous 1.74 (colored)

we must not hardcode the route priority in arplookup, it does not
just insert arp entries. the inserted routes will have the right
priority no matter what, most times cloned.
problem found by Joerg Goltermann <jg@osn.de>, fix by his colleague
Armin Wolgermann <aw@osn.de>, ok claudio

Revision 1.74 / (download) - annotate - [select for diffs], Sun May 11 03:50:23 2008 UTC (16 years ago) by krw
Branch: MAIN
Changes since 1.73: +9 -4 lines
Diff to previous 1.73 (colored)

Try harder to avoid corrupting the mbuf pool. Stuff any mbuf chain in
ln_hold or la_hold into temporary storage and null ln_hold or
la_hold before manually processing the mbuf chain. Discard the mbuf chain
if it is put back in the hold area.

ok claudio@ markus@

Revision 1.73 / (download) - annotate - [select for diffs], Fri May 9 15:48:59 2008 UTC (16 years ago) by claudio
Branch: MAIN
Changes since 1.72: +16 -7 lines
Diff to previous 1.72 (colored)

more rtrequest() to rtrequest1() replacement.
OK henning@

Revision 1.72 / (download) - annotate - [select for diffs], Fri May 9 07:32:39 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored)

arp entries in the routing table should have priority RTF_CONNECTED
ok claudio theo

Revision 1.71 / (download) - annotate - [select for diffs], Thu Apr 24 11:36:38 2008 UTC (16 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

the softnet intr handlers check if the input queue has packets on
it by reading the queues head pointer. if that pointer is not null
then it takes splnet and dequeues a packet for handling. this is
bad because the ifqueue head is modified at splnet and the sofnet
handlers read it without holding splnet.

this removes that check of the head pointer and simply checks if
the dequeue gave us a packet or not before proceeding.

found while reading mpls code.
discussed with norby@ and henning@

ok mcbride@ henning@

Revision 1.70 / (download) - annotate - [select for diffs], Tue Feb 5 22:57:30 2008 UTC (16 years, 4 months ago) by mpf
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.69: +10 -12 lines
Diff to previous 1.69 (colored)

Move carp load balancing (ARP/IP) to a simpler configuration scheme.
Instead of using the same IP on multiple interfaces, carp has to be
configured with the new "carpnodes" and "balancing" options.
 # ifconfig carp0 carpnodes 1:0,2:100,3:100 balancing ip carpdev sis0 192.168.5.50

Please note, that this is a flag day for anyone using carp balancing.
You'll need to adjust your configuration accordingly.

Addititionally this diff adds IPv6 NDP balancing support.

Tested and OK mcbride@, reyk@.
Manpage help by jmc@.

Revision 1.69 / (download) - annotate - [select for diffs], Tue Nov 6 21:52:00 2007 UTC (16 years, 6 months ago) by miod
Branch: MAIN
Changes since 1.68: +6 -2 lines
Diff to previous 1.68 (colored)

Do not panic in arpintr() if IF_DEQUEUE returns NULL, this is perfectly legal
and can happen on slow mp systems under a lot of network load; ok kettenis@

Revision 1.68 / (download) - annotate - [select for diffs], Sun Mar 25 16:43:22 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.67: +10 -4 lines
Diff to previous 1.67 (colored)

Change the "can't allocate llinfo" to a better log message that includes
the problemantic IP address and a hopefully better reason message.
After discussion with dtucker@, "fine with me" deraadt@ some time ago

Revision 1.67 / (download) - annotate - [select for diffs], Sun Mar 18 23:23:17 2007 UTC (17 years, 2 months ago) by mpf
Branch: MAIN
Changes since 1.66: +9 -2 lines
Diff to previous 1.66 (colored)

Add IP load balancing support for carp(4).
This provides a similar functionality as ARP balancing,
but also works for traffic that comes across routers.
IPv6 is supported as well.
The configuration scheme will change as soon we have sth better.

Also add support for changing the MAC address on carp(4)
interfaces. (code from mcbride)

Tested by pyr@ and reyk@
OK mcbride@

Revision 1.66 / (download) - annotate - [select for diffs], Fri Mar 16 16:58:40 2007 UTC (17 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.65: +1 -4 lines
Diff to previous 1.65 (colored)

remove message that prints
        arplookup: unable to enter address for xxx.xxx.xxx.xxx
because it is absolutely useless in a modern world with cable modems
which leak arp packets over IP netblock zones; Anyone who used this as
a diagnostic for real problems has other tools to use; from discussion
with kitella, ok claudio

Revision 1.65 / (download) - annotate - [select for diffs], Mon Aug 21 21:36:53 2006 UTC (17 years, 9 months ago) by mpf
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.64: +14 -4 lines
Diff to previous 1.64 (colored)

Answer ARP queries also for addresses on carp interfaces, if carps
physical interface shares a bridge with the interface that received it.
Patch based on a version from camield@
Fixes PR 5178.
OK mcbride@

Revision 1.64 / (download) - annotate - [select for diffs], Fri Jun 16 16:49:40 2006 UTC (17 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.63: +5 -5 lines
Diff to previous 1.63 (colored)

adjust functions dealing with the routing table to take a table ID as
parameter so they can work on alternate tables. table 0 hardcoded for
many callers yet, that will be adapted step by step.
input + ok claudio norby hshoexer

Revision 1.63 / (download) - annotate - [select for diffs], Wed Mar 22 14:37:44 2006 UTC (18 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)

prevent anything outside rote.c from accessing the routing table heads
directly. rather provide a rt_lookup function for regular lookups,
and a rt_gettable for those that need access to the head for some reason.
the latter cases should be revisted later probably so that nothing outside
the routing core code accesses the heads at all...
tested claudio jolan me, ok claudio markus

Revision 1.62 / (download) - annotate - [select for diffs], Sat Mar 4 22:40:16 2006 UTC (18 years, 3 months ago) by brad
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

With the exception of two other small uncommited diffs this moves
the remainder of the network stack from splimp to splnet.

ok miod@

Revision 1.61 / (download) - annotate - [select for diffs], Tue Nov 29 02:59:42 2005 UTC (18 years, 6 months ago) by jolan
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.60: +1 -1 lines
Diff to previous 1.60 (colored)

something in the eurobsdcon route-a-thon broke my simple home network
router so back out the routing stuff to pre-eurobsdcon where my machine
doesn't crash immediately.

i am happy to test diffs and report success/failures but i am not happy
to have instantaneous crashes when i reboot with a new kernel that was
compiled from pristine sources.

if you are going to be an elitist asshole then you could at least make
sure your code works.

ok and "be crass towards them" deraadt@

Revision 1.60 / (download) - annotate - [select for diffs], Sun Nov 27 16:22:45 2005 UTC (18 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

don't let anything outside route.c access the routing table heads directly,
but go through a provided wrapper.
also provide rt_lookup() instead of doing the lookup manually in many places.
ryan ok

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jul 25 01:10:37 2005 UTC (18 years, 10 months ago) by pascoe
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.58: +6 -6 lines
Diff to previous 1.58 (colored)

minor whitespace cleanup

Revision 1.58 / (download) - annotate - [select for diffs], Tue Mar 1 19:04:56 2005 UTC (19 years, 3 months ago) by mcbride
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.57: +21 -4 lines
Diff to previous 1.57 (colored)

Unbreak arp_input with carp; add back the call to carp_iamatch()
which was removed in rev 1.57. This makes arpbalance work again, and
ensures that only one carp host will reply to a given arp request.

ok mpf@ pascoe@ dhartmei@ deraadt@

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jan 4 10:30:01 2005 UTC (19 years, 5 months ago) by pascoe
Branch: MAIN
Changes since 1.56: +6 -9 lines
Diff to previous 1.56 (colored)

Move processing of ARP packets for CARP addresses to the carp interface
instead of processing them in the parent interface.  This causes us to send
ARP packets on a carpdev with its virtual MAC address as the source, rather
than the parent's physical address.

Permits us to fail over cleanly when connected to devices that use the
source MAC address on a received ARP request to generate an ARP entry for
the requesting host, rather than going through the who-has/is-at procedure.

ok niklas@ mcbride@

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 4 09:29:43 2005 UTC (19 years, 5 months ago) by pascoe
Branch: MAIN
Changes since 1.55: +4 -4 lines
Diff to previous 1.55 (colored)

Use pseudo_AF_HDRCMPLT for outgoing ARP messages, otherwise the provided
source MAC address we provide is ignored by ether_output.

ok mcbride@ niklas@

Revision 1.55 / (download) - annotate - [select for diffs], Tue Dec 7 20:38:46 2004 UTC (19 years, 5 months ago) by mcbride
Branch: MAIN
Changes since 1.54: +7 -3 lines
Diff to previous 1.54 (colored)

Convert carp(4) to behave more like a regular interface, much in the same
style as vlan(4). carp interfaces no longer require the physical interface
to be on the same subnet as the carp interface, or even that the physical
interface has an adress at all, so CARP can now be used on /30 networks.

ok deraadt@ henning@

Revision 1.54 / (download) - annotate - [select for diffs], Mon Jun 21 23:50:37 2004 UTC (19 years, 11 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.53: +10 -10 lines
Diff to previous 1.53 (colored)

First step towards more sane time handling in the kernel -- this changes
things such that code that only need a second-resolution uptime or wall
time, and used to get that from time.tv_secs or mono_time.tv_secs now get
this from separate time_t globals time_second and time_uptime.

ok art@ niklas@ nordin@

Revision 1.19.2.11 / (download) - annotate - [select for diffs], Thu Feb 19 10:57:23 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.19.2.10: +70 -58 lines
Diff to previous 1.19.2.10 (colored) to branchpoint 1.19 (colored) next main 1.20 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.53 / (download) - annotate - [select for diffs], Thu Dec 18 09:23:14 2003 UTC (20 years, 5 months ago) by ho
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.52: +7 -12 lines
Diff to previous 1.52 (colored)

Permit ethernet multicast addresses, as used by some HA/failover solutions. Suggested by and ok markus@.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Dec 10 07:22:43 2003 UTC (20 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.51: +26 -26 lines
Diff to previous 1.51 (colored)

de-register.  deraadt ok

Revision 1.51 / (download) - annotate - [select for diffs], Fri Nov 7 22:04:46 2003 UTC (20 years, 6 months ago) by mcbride
Branch: MAIN
Changes since 1.50: +1 -3 lines
Diff to previous 1.50 (colored)

Clean up carp_iamatch() behaviour so we don't reply to arp requests when
the interface is ifconfig'd down.

Patch from Marco Pfatschbacher

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Fri Oct 31 00:07:52 2003 UTC (20 years, 7 months ago) by brad
Branch: OPENBSD_3_4
Changes since 1.48: +10 -2 lines
Diff to previous 1.48 (colored) next main 1.49 (colored)

Pull patch from -current:
Fixed by itojun@

Fix on-link DoS by bogus ARP. Reported by Apple.

ok itojun@ deraadt@

Revision 1.50 / (download) - annotate - [select for diffs], Fri Oct 17 21:04:58 2003 UTC (20 years, 7 months ago) by mcbride
Branch: MAIN
Changes since 1.49: +32 -21 lines
Diff to previous 1.49 (colored)

Common Address Redundancy Protocol

Allows multiple hosts to share an IP address, providing high availability
and load balancing.

Based on code by mickey@, with additional help from markus@
and Marco_Pfatschbacher@genua.de

ok deraadt@

Revision 1.45.2.2 / (download) - annotate - [select for diffs], Wed Oct 1 22:53:34 2003 UTC (20 years, 8 months ago) by brad
Branch: OPENBSD_3_2
Changes since 1.45.2.1: +10 -2 lines
Diff to previous 1.45.2.1 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored)

Pull patch from -current:
Fixed by itojun@

Fix on-link DoS by bogus ARP. Reported by Apple.

ok itojun@ deraadt@

Revision 1.45.4.2 / (download) - annotate - [select for diffs], Wed Oct 1 20:36:56 2003 UTC (20 years, 8 months ago) by margarida
Branch: OPENBSD_3_3
Changes since 1.45.4.1: +10 -2 lines
Diff to previous 1.45.4.1 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored)

Pull patch from -current:
Fixed by itojun@

Fix on-link DoS by bogus ARP. Reported by Apple.

ok itojun@ deraadt@

Revision 1.49 / (download) - annotate - [select for diffs], Wed Sep 24 21:11:34 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.48: +10 -2 lines
Diff to previous 1.48 (colored)

on-link DoS by bogus ARP.  reported by apple

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Sun Aug 24 23:20:37 2003 UTC (20 years, 9 months ago) by brad
Branch: OPENBSD_3_2
Changes since 1.45: +4 -2 lines
Diff to previous 1.45 (colored)

MFC:
Fix by dhartmei@

Free mbuf when dropping invalid ARP with ar_hrd != ARPHRD_ETHER, instead
of leaking. Reported by orjan.sjelvgren@ignite.com. ok jason@, krw@ and
henning@.

ok deraadt@

Revision 1.19.2.10 / (download) - annotate - [select for diffs], Sat Jun 7 11:06:08 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.19.2.9: +29 -8 lines
Diff to previous 1.19.2.9 (colored) to branchpoint 1.19 (colored)

Sync SMP branch to -current

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:13 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE
Branch point for: OPENBSD_3_4
Changes since 1.47: +2 -6 lines
Diff to previous 1.47 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.35.2.3 / (download) - annotate - [select for diffs], Mon May 19 22:40:40 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.35.2.2: +4 -2 lines
Diff to previous 1.35.2.2 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

sync

Revision 1.47 / (download) - annotate - [select for diffs], Sat May 17 15:15:23 2003 UTC (21 years ago) by itojun
Branch: MAIN
Changes since 1.46: +28 -3 lines
Diff to previous 1.46 (colored)

don't send ARP for secondary IPv4 addresses, treat them as local.
kwesterback tdeval ok

Revision 1.19.2.9 / (download) - annotate - [select for diffs], Tue May 13 19:36:16 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.19.2.8: +4 -2 lines
Diff to previous 1.19.2.8 (colored) to branchpoint 1.19 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.45.4.1 / (download) - annotate - [select for diffs], Mon May 12 04:07:20 2003 UTC (21 years ago) by margarida
Branch: OPENBSD_3_3
Changes since 1.45: +4 -2 lines
Diff to previous 1.45 (colored)

Pull patch from -current:
Free mbuf when dropping invalid ARP with ar_hrd != ARPHRD_ETHER, instead
of leaking. Reported orjan.sjelvgren@ignite.com.

ok deraadt@

Revision 1.46 / (download) - annotate - [select for diffs], Sun May 4 11:56:32 2003 UTC (21 years, 1 month ago) by dhartmei
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.45: +4 -2 lines
Diff to previous 1.45 (colored)

Free mbuf when dropping invalid ARP with ar_hrd != ARPHRD_ETHER, instead
of leaking. Reported by orjan.sjelvgren@ignite.com. ok jason@, krw@ and
henning@.

Revision 1.19.2.8 / (download) - annotate - [select for diffs], Fri Mar 28 00:06:54 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.19.2.7: +53 -9 lines
Diff to previous 1.19.2.7 (colored) to branchpoint 1.19 (colored)

Sync the SMP branch with 3.3

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:46 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.35.2.1: +6 -6 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored)

sync to -current

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:31:36 2002 UTC (21 years, 11 months ago) by art
Branch: UBC
Changes since 1.35: +103 -24 lines
Diff to previous 1.35 (colored)

Sync UBC branch to -current

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jun 9 16:26:10 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_3_BASE, OPENBSD_3_2_BASE
Branch point for: OPENBSD_3_3, OPENBSD_3_2
Changes since 1.44: +6 -6 lines
Diff to previous 1.44 (colored)

whitespace

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jun 9 07:50:57 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.43: +12 -1 lines
Diff to previous 1.43 (colored)

support published arp entries again.  PR 2635 (confirmed by submitter).

Revision 1.43 / (download) - annotate - [select for diffs], Sun Jun 9 05:25:50 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

typo

Revision 1.42 / (download) - annotate - [select for diffs], Sun Jun 9 05:08:37 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.41: +34 -2 lines
Diff to previous 1.41 (colored)

force FDDI link MTU be FDDI IPv4 MTU.  PR 2714.  jason ok

Revision 1.41 / (download) - annotate - [select for diffs], Fri Jun 7 23:30:26 2002 UTC (22 years ago) by aaron
Branch: MAIN
Changes since 1.40: +4 -3 lines
Diff to previous 1.40 (colored)

Use LIST macros instead of accessing field members directly; jason@ ok

Revision 1.19.2.7 / (download) - annotate - [select for diffs], Thu Mar 28 14:56:45 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.19.2.6: +9 -9 lines
Diff to previous 1.19.2.6 (colored) to branchpoint 1.19 (colored)

Merge in -current from roughly a week ago

Revision 1.40 / (download) - annotate - [select for diffs], Wed Mar 27 17:13:47 2002 UTC (22 years, 2 months ago) by ian
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

suppress "duplicate IP" message when booting machines with no initial IP.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Mar 14 03:16:11 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Final __P removal plus some cosmetic fixups

Revision 1.38 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:11 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.37: +9 -9 lines
Diff to previous 1.37 (colored)

First round of __P removal in sys

Revision 1.19.2.6 / (download) - annotate - [select for diffs], Wed Mar 6 02:15:07 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.19.2.5: +52 -16 lines
Diff to previous 1.19.2.5 (colored) to branchpoint 1.19 (colored)

Merge in trunk

Revision 1.37 / (download) - annotate - [select for diffs], Tue Feb 26 20:24:58 2002 UTC (22 years, 3 months ago) by jason
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Cut/pasto: don't forget to scan for the source address

Revision 1.36 / (download) - annotate - [select for diffs], Fri Feb 15 15:27:17 2002 UTC (22 years, 3 months ago) by jason
Branch: MAIN
Changes since 1.35: +46 -11 lines
Diff to previous 1.35 (colored)

Clean up arpinput (based on similiar changes in NetBSD), also be sure to
setup the arpcom when we're allowing lazy matches on bridged interfaces.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Dec 8 06:15:15 2001 UTC (22 years, 5 months ago) by jason
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.34: +9 -8 lines
Diff to previous 1.34 (colored)

style: Use queue.h macro's for list traversal, convert several (&thing)->foo
to thing.foo under the principal less puncuation is easier to read.

Revision 1.19.2.5 / (download) - annotate - [select for diffs], Tue Nov 13 22:59:58 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.19.2.4: +2 -2 lines
Diff to previous 1.19.2.4 (colored) to branchpoint 1.19 (colored)

merge in -current

Revision 1.34 / (download) - annotate - [select for diffs], Tue Nov 6 19:53:20 2001 UTC (22 years, 7 months ago) by miod
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.
(Look ma, I might have broken the tree)

Revision 1.19.2.4 / (download) - annotate - [select for diffs], Wed Oct 31 03:29:03 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.19.2.3: +15 -15 lines
Diff to previous 1.19.2.3 (colored) to branchpoint 1.19 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jul 8 12:31:12 2001 UTC (22 years, 11 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.32: +15 -15 lines
Diff to previous 1.32 (colored)

Remove static from func decls

Revision 1.19.2.3 / (download) - annotate - [select for diffs], Wed Jul 4 10:54:28 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.19.2.2: +3 -8 lines
Diff to previous 1.19.2.2 (colored) to branchpoint 1.19 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jun 9 06:14:11 2001 UTC (22 years, 11 months ago) by angelos
Branch: MAIN
Changes since 1.31: +1 -7 lines
Diff to previous 1.31 (colored)

Less aggressive include cleanup, so it won't piss of Theo again (one hopes)

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 8 20:32:24 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +8 -0 lines
Diff to previous 1.30 (colored)

it is nice if the kernel compiles

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jun 8 03:53:45 2001 UTC (23 years ago) by angelos
Branch: MAIN
Changes since 1.29: +1 -9 lines
Diff to previous 1.29 (colored)

Cut down on include files.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Wed May 16 04:06:01 2001 UTC (23 years ago) by jason
Branch: OPENBSD_2_9
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

Pull in patch from current:
Fix (gluk):
Accept ARP packet coming from bridge interface without IP address
configured. But deny such a packet if it coming on "wrong" bridge.

Reported and tested by form@
ho@, jason@ Ok.

Revision 1.29 / (download) - annotate - [select for diffs], Tue May 15 15:12:54 2001 UTC (23 years ago) by gluk
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

Accept ARP packet coming from bridge interface without IP address
configured. But deny such a packet if it coming on "wrong" bridge.

Reported and tested by form@
ho@, jason@ Ok.

Revision 1.19.2.2 / (download) - annotate - [select for diffs], Mon May 14 22:40:07 2001 UTC (23 years ago) by niklas
Branch: SMP
Changes since 1.19.2.1: +72 -40 lines
Diff to previous 1.19.2.1 (colored) to branchpoint 1.19 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.28 / (download) - annotate - [select for diffs], Tue Feb 6 00:22:24 2001 UTC (23 years, 4 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE
Branch point for: OPENBSD_2_9
Changes since 1.27: +3 -4 lines
Diff to previous 1.27 (colored)

allow changing number of loopbacks in ukc.
change rest of the code to use lo0ifp pointing
to the corresponding struct ifnet.
itojun@ and niklas@ ok

Revision 1.27 / (download) - annotate - [select for diffs], Mon Feb 5 15:22:11 2001 UTC (23 years, 4 months ago) by jason
Branch: MAIN
Changes since 1.26: +21 -14 lines
Diff to previous 1.26 (colored)

with a bunch of encapsulation layers, eg. (IPsec+IP+EtherIP+ether_header),
the arp data will not necessarily be in the first mbuf: add m_pullup()'s
to make it so.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jan 19 06:37:37 2001 UTC (23 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).

have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument.
pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest.
3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr *
(almost noone is using it anyways).

benefit: the follwoing command now works.  previously we need two route(8)
invocations, "add" then "change".
# route add -inet6 default ::1 -ifp gif0

remove unsafe typecast in rtrequest(), from rtentry * to sockaddr *.  it was
introduced by 4.3BSD-reno and never corrected.

XXX is eon_rtrequest() change correct regarding to 3rd arg?
eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno,
so i do not have correct answer in the source code.
someone with more clue about netiso-over-ip, please help.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 28 23:56:47 2000 UTC (23 years, 5 months ago) by mickey
Branch: MAIN
Changes since 1.24: +8 -10 lines
Diff to previous 1.24 (colored)

export arprequest() and make it use ifnet* as the 1st arg; tested; angelos@ ok

Revision 1.24 / (download) - annotate - [select for diffs], Mon Nov 27 16:20:43 2000 UTC (23 years, 6 months ago) by ho
Branch: MAIN
Changes since 1.23: +4 -2 lines
Diff to previous 1.23 (colored)

Style. Parts of xcast handling needs more thought. (provos@ ok)

Revision 1.23 / (download) - annotate - [select for diffs], Mon Nov 27 14:57:52 2000 UTC (23 years, 6 months ago) by ho
Branch: MAIN
Changes since 1.22: +29 -8 lines
Diff to previous 1.22 (colored)

Be more careful with ARP. Fix PR#1490. From gluk@ptci.ru

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jun 22 19:05:51 2000 UTC (23 years, 11 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.21: +9 -4 lines
Diff to previous 1.21 (colored)

Convert arptimer to new timeouts.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jun 20 17:56:10 2000 UTC (23 years, 11 months ago) by art
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)


Remove static from arptimer so that "show callout" in ddb shows the right
function.

Revision 1.19.2.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:35 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.19: +1 -7 lines
Diff to previous 1.19 (colored)

Sync with -current

Revision 1.20 / (download) - annotate - [select for diffs], Fri Mar 17 22:05:57 2000 UTC (24 years, 2 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.19: +1 -7 lines
Diff to previous 1.19 (colored)

remove multiple function declarations.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Nov 10 18:48:47 1999 UTC (24 years, 6 months ago) by chris
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE
Branch point for: SMP
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Fix typo in printf

Revision 1.18 / (download) - annotate - [select for diffs], Sun Aug 8 02:42:59 1999 UTC (24 years, 10 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored)

Fix cases when wanting to communicate with the bridge'
s remote interfaces, both ARP and local delivery had bugs

Revision 1.17 / (download) - annotate - [select for diffs], Sun Aug 8 00:43:00 1999 UTC (24 years, 10 months ago) by niklas
Branch: MAIN
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored)

Support detaching of network interfaces.  Still work to do in ipf, and
other families than inet.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Aug 2 22:51:15 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

Ethernet, not 10 Mb/s Ethernet

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jul 18 21:36:40 1999 UTC (24 years, 10 months ago) by ho
Branch: MAIN
Changes since 1.14: +16 -5 lines
Diff to previous 1.14 (colored)

Prevent host on one interface from overwriting ARP route entry for a
host on a different interface. Also add interface name to other overwrite
diagnostic messages.

Revision 1.14 / (download) - annotate - [select for diffs], Sun May 16 00:34:40 1999 UTC (25 years ago) by ho
Branch: MAIN
Changes since 1.13: +16 -4 lines
Diff to previous 1.13 (colored)

Add support for static ARP entries that cannot be overwritten.
Ordinary static ARPs that are overwritten will no longer still be static.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Mar 13 21:15:16 1999 UTC (25 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.12: +15 -13 lines
Diff to previous 1.12 (colored)

indent

Revision 1.12 / (download) - annotate - [select for diffs], Sun Sep 28 23:09:56 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

more \n in log()

Revision 1.11 / (download) - annotate - [select for diffs], Fri Aug 1 03:53:01 1997 UTC (26 years, 10 months ago) by flipk
Branch: MAIN
Changes since 1.10: +7 -1 lines
Diff to previous 1.10 (colored)

when family is AF_UNSPEC,
ether_shost fields no longer get set for us.
initialize them ourselves.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jul 24 22:59:35 1997 UTC (26 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +4 -1 lines
Diff to previous 1.9 (colored)

do not ignore IFF_NOARP

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 21 07:52:05 1997 UTC (26 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +3 -1 lines
Diff to previous 1.8 (colored)

make this compile until niklas fixes the boo-boo

Revision 1.8 / (download) - annotate - [select for diffs], Tue Feb 11 22:23:14 1997 UTC (27 years, 3 months ago) by kstailey
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.7: +0 -0 lines
Diff to previous 1.7 (colored)

IPF 1.3.7

Revision 1.7 / (download) - annotate - [select for diffs], Wed May 22 11:48:45 1996 UTC (28 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.6: +10 -16 lines
Diff to previous 1.6 (colored)

When sending an ARP request, use the interface address for the route, rather
than the first address assigned.  This gives slightly different behaviour in
the presence of aliases.  From Bill Fenner, via Pete Bentley.

Revision 1.6 / (download) - annotate - [select for diffs], Fri May 10 12:31:19 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -4 lines
Diff to previous 1.5 (colored)

if_name/if_unit -> if_xname/if_softc

Revision 1.5 / (download) - annotate - [select for diffs], Sun Apr 21 22:28:58 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.4: +8 -8 lines
Diff to previous 1.4 (colored)

partial sync with netbsd 960418, more to come

Revision 1.4 / (download) - annotate - [select for diffs], Sun Mar 3 22:30:24 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.3: +24 -4 lines
Diff to previous 1.3 (colored)

From NetBSD: 960217 merge

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jan 6 15:55:59 1996 UTC (28 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

one more inet_ntoa() improvement

Revision 1.2 / (download) - annotate - [select for diffs], Tue Nov 28 22:42:55 1995 UTC (28 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +7 -5 lines
Diff to previous 1.1 (colored)

add inet_ntoa() to the kernel. use it to log nicer messages. idea from freebsd

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:10 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:53:10 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.