Age | Commit message (Collapse) | Author |
|
ignored. Initialize 'error' to 0.
CID 1483380
ok mpi@
|
|
address as the one trying to be inserted.
Such entry must stay in the table as long as its parent route exist. If
a code path tries to re-insert a route with the same destination address
on the same interface it is a bug.
Avoid the "route contains no arp information" problem reported by sthen@
and Laurent Salle.
ok claudio@
|
|
|
|
each dereference. r1.275 added a check at the top of the function,
with an immediate "return (-1)" if src == NULL. Thus making the
repeated checks in the body superfluous.
CID 1452932.
ok millert@ mpi@
|
|
returning a (possibly uninitialized) value.
CID 1483466.
ok millert@
|
|
The routing labels have nothing todo with rdomains and routing tables.
Remove the unneeded rdomain check. With this rtlabel on interfaces work again.
OK kn@
|
|
address could trigger the "rt->rt_ifidx == ifp->if_index" assertion.
In rtflushclone() the ifp that is passed to rtdeletemsg() has been
changed from the route interface to the ifa interface. Restore the
old behavior and get the route ifp.
found by regress/sys/netinet/carp; OK mpi@
|
|
rtable_walk(9) now passes a routing entry back to the caller when
a non zero value is returned and if it asked for it.
This allows us to call rtdeletemsg()/rtrequest_delete() from the
caller without creating a recursion because of rtflushclone().
Multicast code hasn't been adapted and is still possibly creating
recursions. However multicast route entries aren't cloned so if
a recursion exists it isn't because of rtflushclone().
Fix stack exhaustion triggered by the use of "-msave-args".
Issue reported by Dániel Lévai on bugs@ confirmed by and ok bluhm@.
|
|
before adding it to the routing table. The rtable code is doing memcmp()
of those rt_dest sockaddrs so it is important that they are stored in a
canonical form. To do this struct domain is extended to include the
sockaddr size for this address family.
OK bluhm@ anton@
Reported-by: syzbot+10fe9cd8d0211c562ead@syzkaller.appspotmail.com
|
|
the RTF_MPLS can't be toggled without rt_mpls_set() being called. While
RTF_MPLS is part of RTF_FMASK it should be excluded from the flags and mask
when they are applied to the route since toggling it requires a call to
rt_mpls_set().
OK bluhm@
Reported-by: syzbot+86344a9e31c27aa6f15b@syzkaller.appspotmail.com
|
|
type,
and definately don't do this to the length: (unsigned)(cplim2 - cp2)
ok claudio
|
|
because the rtable_l2 is modified before calling rt_ifa_del.
Triggered by regress test and reported by Moritz Buhl mbuhl at mbuhl dot me
|
|
this allows mpls interfaces (mpe, mpw) to pass the rdomain they
wish the local label to be in, rather than have it implicitly forced
to 0 by these functions. right now they'll pass 0, but it will soon
be possible to have them rx packets in other rdomains.
previously the functions used ifp->if_rdomain for the rdomain.
everything other than mpls still passes ifp->if_rdomain.
ok mpi@
|
|
MPLS interfaces (ab)use rt_ifa_add for adding the local MPLS label
that they listen on for incoming packets, while every other use of
rt_ifa_add is for adding addresses on local interfaces. MPLS does
this cos the addresses involved are in basically the same shape as
ones used for setting up local addresses.
It is appropriate for interfaces to want RTF_MPATH on local addresses,
but in the MPLS case it means you can have multiple local things
listening on the same label, which doesn't actually work. mpe in
particular keeps track of in use labels to it can handle collisions,
however, mpw does not. It is currently possible to have multiple
mpw interfaces on the same local label, and sharing the same label
as mpe or possible normal forwarding labels.
Moving the RTF_MPATH flag out of rt_ifa_add means all the callers
that still want it need to pass it themselves. The mpe and mpw
callers are left alone without the flag, and will now get EEXIST
from rt_ifa_add when a label is already in use.
ok (and a huge amount of patience and help) mpi@
claudio@ is ok with the idea, but saw a much much earlier solution
to the problem
|
|
the network mask. This saves converting the prefixlen to a mask and back.
OK phessler@, benno@
|
|
RTF_LOCAL entries or static ARP entries don't have parents, so the logic
was incorrect. Note that it might be possible to extend the logic to work
with non-cloned L2 entries but the few use cases do not justify the
complexity (yet).
Problem reported & fix tested by Elie Bouttier.
ok bluhm@, visa@, claudio@
|
|
|
|
ok claudio@
|
|
ok visa@, tb@
|
|
Input bluhm
OK benno, kn, claudio
|
|
route entry.
This makes sure we pass the correct size to free(9).
Reproted by and ok dlg@
|
|
entry that has been cloned from a different RTF_CLONING route.
Bug report & ok friehm@
|
|
ok claudio@, jmatthew@
|
|
the correct one to clone the gateway.
Fix wired vs wireless on the same subnet issue as well as a more
complicated setup reported by dlg@.
ok jmatthew@, claudio@, dlg@
|
|
This will be needed to select the proper cloning route in a multipath
scenario.
While here remove a NET_ASSERT_LOCKED(), the routing table doesn't need
the lock.
ok dlg@
|
|
still had this hack in. This needs to be revisted and better understood.
It may be needed to add a mplsrdomain to mpe(4) but MPLS only in the rtable 0
is hardcoded in more places and we should fix them all.
OK mpi@
|
|
no entry are missed.
While here do not re-ordered or send messages for route entries that are
already in the expected state.
Make rttest30 pass.
ok gerhard@
|
|
Tested by Hrvoje Popovski, ok bluhm@
|
|
ok bluhm@, florian@
|
|
OK mpi
|
|
Prompted by a bugreport by naddy that IPv6 autoconfiguration is broken
in the installer.
OK mpi, "go for it" deraadt
|
|
rtdeletemsg().
ok bluhm@
|
|
Reduce differences with rtm_miss().
ok claudio@, bluhm@
|
|
So rename it to rtm_getifa(), move it where it belongs and stop calling
it from rtrequest(9). Route entries created by the kernel must always
specify the corresponding `ifa'.
ok claudio@
|
|
try to remove a route from the table if it is and invalid cache.
This is a step towards decoupling code dealing with userland and kernel
inserted routes.
ok bluhm@
|
|
aren't protected by the NET_LOCK().
While here change lock assertions in rt_{set,put}gwroute(), the NET_LOCK()
is enough.
Tested by Hrvoje Popovski.
ok jmatthew@, claudio@
|
|
so use rtable_l2() to get the right id. Fixes adding routes to rtables.
OK mpi@ phessler@
|
|
ok visa@
|
|
No binary change.
OK mpi@
|
|
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@
|
|
OK claudio@ mpi@
|
|
rtalloc(9) should be reserved for the hot path otherwise it's hard
to interpret the value of the 'use' counter.
ok claudio@
|
|
OK mikeb@
|
|
This makes the API simpler, and is probably more useful than spreading
counters memory other several types, making it harder to track.
Prodded by mpi, ok mpi@ stsp@
|
|
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@
|