| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
| |
callers rtfree(9) it.
ok bluhm@
|
|
|
|
|
| |
Issue _17 found by Maxime Villard Brainy scanner.
OK bluhm@
|
|
|
|
|
|
| |
needs to see lo0 in the output path.
ok claudio@
|
|
|
|
|
|
| |
the kernel lock.
"do it" claudio@ mpi@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
to get nfs working.
ok claudio@
|
|
|
|
| |
ok claudio@
|
| |
|
| |
|
|
|
|
|
|
|
| |
This is needed for proper refcounting of rtentries and reduce differences
with nd6_lookup().
Tweak and ok bluhm@
|
|
|
|
| |
some grep output noise.
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
route and not during the SIOCSIFADDR ioctl. This way addresses are
not announced when an error occurs.
ok chris@, claudio@
|
| |
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
annoying trailing, leading and embedded whitespace. No change to
.o files.
ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
resolution is completed to ml_init(9) API.
Tested by kspillner@, inputs & ok dlg@
|
|
|
|
|
| |
the Ethernet frame. Prevent an overflow reported by Henk Jan Agteresch
on bugs@.
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
ARP information is of a different kind.
ok sthen@, claudio@
|
|
|
|
|
|
| |
This unify some code and notify userland for free.
blambert@ agrees, ok bluhm@
|
|
|
|
| |
email.
|
|
|
|
|
|
|
| |
Instead check the error code returned by this function and let the
caller free the route entry when appropriate.
ok bluhm@
|
|
|
|
|
|
|
|
| |
changed or if we asked for it.
Should reduce the RTM_RESOLVE storm seeing by claudio@
With inputs from and ok mikeb@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
| |
long live the one true internet.
ok henning mikeb
|
|
|
|
| |
ok mikeb@, krw@, bluhm@, tedu@
|
|
|
|
|
|
| |
functionnality instead of a mix of enable/disable.
ok bluhm@, jca@
|
|
|
|
|
|
|
|
| |
use them for address lookups.
While here do let in_arpinput() overwrite local or broadcast entries.
ok mikeb@, florian@
|
|
|
|
| |
the tree. Found by millert@.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
ok henning@, dlg@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
it introduces a regression with default routes & p2p interfaces.
Problem reported by naddy@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
local traffic is not optional.
ok mikeb@, stsp@, jca@
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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@
|