Age | Commit message (Collapse) | Author |
|
rectification.
|
|
OK mpi@
|
|
ok mpi@
|
|
should fix a panic reported by Hrvoje Popovski
|
|
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@
|
|
prevent a mpath conflict for /32 RTF_CLONING routes.
Found the hardway by jsing@ on Google Compute Engine.
ok bluhm@, jsing@
|
|
gateway is not reachable (e.g. not on a local subnet).
ok millert@ mikeb@ mpi@
(and shrugs by jca@)
|
|
when RTF_CONNECTED routes are added to the routing table.
Specify a route priority calculated in the same way when deleting such routes.
Makes route add and delete code paths consistent again.
ok mpi@
|
|
calling splsoftnet() recursively.
|
|
NULL tests.
ok mpi@
|
|
ok jsg@
|
|
Note that dereferencing ``rt_ifa'' after calling rtfree(9) is generally
not safe. In this case we rely on the fact that rtredirect() is still
serialized with interface ioctl(2)s.
This function cries for a rewrite.
Reported by and ok jsg@
|
|
When multiple RTF_CLONING routes exist for a given subnet, bringing
one of the interfaces up/down could make impossible to insert new
ARP/NDP entries.
In this case the first RTF_CONNECTED route of the multipath list no
longer corresponded to the wired interface because it had the same
priority as the carp(4) route.
This is another regression of supporting multiple RTF_CONNECTED routes.
Fix a bug with a CARP setup reported by stsp@
ok stsp@
|
|
In order to stop abusing lo0 for all rdomains, a new loopback interface
will be created every time a rdomain is created. The unit number will
be the same as the rdomain, i.e. lo1 will be attached to rdomain 1.
If this loopback interface is already in use it wont be possible to create
the corresponding rdomain.
In order to know which lo(4) interface is attached to a rdomain, its index
is stored in the rtable/rdomain map.
This is a long overdue since the introduction of rtable/rdomain. It also
fixes a recent regression due to resetting the rdomain of an incoming
packet reported by semarie@, Andreas Bartelt and Nils Frohberg.
ok claudio@
|
|
Timers configured via rt_timer_add(9) always run at IPL_SOFTNET, so
assert that rather than calling splsoftnet().
ok bluhm@
|
|
ifa_ifwithnet() checks if a given address is directly connected. This
function predates the introduction of the BSD routing table. Nowdays
we can check if the route for the given address is marked as RTF_GATEWAY.
This works on OpenBSD because we always install RTF_CONNECTED routes
for subnets a and RTF_HOST route per p2p link.
ok vgross@
|
|
splsoftnet() if the function does a splsoftassert(IPL_SOFTNET)
anyway.
|
|
routing table.
Found the hardway by Chris Jackman.
|
|
There's no need to insert an RTF_LOCAL route if it is already there, not
if a route with the same destination exist.
This fixes a KASSERT() triggered by adding an alias for an address already
present in the ARP cache as reported by weerd@ and Peter J. Philipp.
This should also fix a KASSERT() triggered by a NDP change reported by
Sebastien Marie.
ok bluhm@
|
|
|
|
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);
|
|
Since our BFD implementation relies on the existence of routes, it is much
easier to set the BFD parameters with RTM_CHANGE, especially if something
bad happen.
Discussed with and ok phessler@, claudio@
|
|
not before.
ok claudio@
|
|
Leaving a NULL pointer on a RTF_GATEWAY is no longer supported,
and a KASSERT() triggers.
Found the hardway by and ok sthen@
|
|
rtrequest_delete(). The inpcb has a cache of the route that still
exists when the interface has been detached.
kassert triggered from tcp timeout by awolk@; OK mpi@
|
|
This is done to stop using stale ifa attached to routes, which is
the easiest way to make rtisvalid(9) MP-safe.
sthen@ and henning@ like it, ok claudio@
|
|
in bfd.c. Make bfd_rtfree() a void function.
OK phessler@
|
|
OK claudio@, henning@
|
|
be triggered from userland. A gateway route is simply not valid
if its gwroute is not up.
OK phessler@
|
|
route_output().
ok claudio@
|
|
New RTF_CLONING routes don't have children, but the kernel might end up
removing routes from a compatible route. This bug has been introduced
with the support for multiple RTF_CLONING routes.
Also make sure to release possible RTF_CACHED route *before* flushing
RTF_CLONED children when deleting a route.
KASSERT() reported by akfaew, sthen@ and martijn@
ok benno@
|
|
ok claudio@ mpi@
|
|
when adding a route to gateway to ensure a most specific match.
This makes "# route add" coherent to "# route get" even with
p2p interfaces. Fix a problem reported by Mart Tõnso.
This also fix rttest20 after the introduction of RTF_CACHED.
ok vgross@
|
|
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@
|
|
ok phessler@, bluhm@, tedu@, natano@
|
|
This allows rt_if_remove() to remove RTF_BROACAST routes from down
interfaces.
Issue reported by Dimitris Papastamos on bugs@
ok dlg@, claudio@, phessler@
|
|
the walk if a route cannot be deleted.
Prevent an infinite recursion reported by Dimitris Papastamos.
ok claudio@
|
|
Previously the code was "too clever" and returned EAGAIN only for
cloning route assuming that other deletion did not modify the tree.
Analysed by and ok dlg@
|
|
to create and change the dynamic route. This behavior was introduced
in net/route.c rev 1.269 when the gateway route allocation was moved
from rt_setgateway() to _rtalloc(). So rtrequest(RTM_ADD) could
return a route without a valid gateway route. To fix this, call
rt_setgwroute() from _rtalloc() and rt_setgateway().
OK mpi@
|
|
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.
|
|
``rt->rt_ifa'' later.
|
|
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@
|
|
|
|
when adding a route to gateway to ensure a most specific match.
This makes "# route add" coherent to "# route get" even with
p2p interfaces. Fix a problem reported by Mart Tõnso.
ok vgross@
|
|
|
|
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@
|
|
ok mpi@
|
|
becomes DOWN.
This follows the same reasonning as for L2 (cloned) entries.
Hopefully enough to fix tedu@'s stale RTF_DYNAMIC routes when switching
WiFi network during suspend/resume.
ok sthen@
|
|
Help to track the leak from Hrvoje Popovski, ok bluhm@
|
|
callbacks return EAGAIN if they modify the routing table. While we're here,
simplify life for rtable_walk callers by moving the loop that restarts the
walk on EAGAIN into rtable_walk itself.
Flushing cloned routes on interface state changes becomes a bit more
inefficient, but this can be improved later.
ok mpi@ dlg@
|