| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Since our last concurrency mistake only ioctl(2) ans sysctl(2) code path
take the reader lock. This is mostly for documentation purpose as long as
the softnet thread is converted back to use a read lock.
dlg@ said that comments should be good enough.
ok sashan@
|
|
|
|
|
|
|
|
|
|
| |
made from socket close path. Most device drivers are not MP-safe yet,
and the closing of AF_INET and AF_INET6 sockets is no longer under the
kernel lock.
This fixes a panic seen by jcs@.
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
| |
out of the rtable_walk(). This avoids recursion to prevent stack
overflow. Also it allows freeing the route outside of the walk.
Now mrt_mcast_del() frees the route only when it is deleted from
the routing table. If that fails, it must not be freed. After the
route is returned by mfc_find(), it is reference counted. Then we
need a rtfree(), but not in the other caes.
Move rt_timer_remove_all() into rt_mcast_del().
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@.
|
|
|
|
|
|
|
|
|
|
| |
mrt{6,}_ioctl. Calling shutdown(2) on the socket prior to the ioctl
command can cause it to be NULL.
ok bluhm@ claudio@
Reported-by: syzbot+bdc489ecb509995a21ed@syzkaller.appspotmail.com
Reported-by: syzbot+156405fdea9f2ab15d40@syzkaller.appspotmail.com
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
rtable 255 is a valid routing table or domain id that wasn't handled
by the ip[6]_mroute code or by snmpd. The arrays in the ip[6]_mroute
code where off by one and didn't allocate space for rtable 255; snmpd
simply ignored rtable 255. All other places in the tree seem to
handle RT_TABLEID_MAX correctly.
OK florian@ benno@ henning@ deraadt@
|
|
|
|
|
|
|
|
|
|
| |
protected: mrt_ioctl() and in_ioctl(). The former has no other callers
and only needs a read lock. The latter will need refactoring to reduce
the lock's scope further. In a first step, establish a single exit point
and protect most of the function body with the NET_LOCK() while removing
the NET_LOCK() from a handful of callers.
suggested by & ok mpi, ok visa
|
|
|
|
|
|
| |
all the callers to call m_freem(9).
Support from deraadt@ and tedu@, ok visa@, bluhm@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
buffers.
This is one step towards unlocking TCP input path. Note that all the
functions asserting for the socket lock are not necessarilly MP-safe.
All the fields of 'struct socket' aren't protected.
Introduce a new kernel-only kqueue hint, NOTE_SUBMIT, to be able to
tell when a filter needs to lock the underlying data structures. Logic
and name taken from NetBSD.
Tested by Hrvoje Popovski.
ok claudio@, bluhm@, mikeb@
|
|
|
|
|
|
| |
error. Make the ip_mforward() return value consistent. Simplify
the caller logic in ipv6_input() like in IPv4.
OK mpi@
|
|
|
|
|
|
|
|
| |
* use a variable to allow disabling debugs on run-time
* fix a potential memory leak on copyout() failure
* don't just blindly use the first address provided by ifalist
ok bluhm@
|
|
|
|
| |
ok bluhm@
|
|
|
|
| |
ok visa@
|
|
|
|
|
|
|
| |
setsockopt(), otherwise use non-blocking malloc() for network stack
calls.
ok bluhm@
|
|
|
|
|
|
|
|
| |
when finding one. Since rtfree() is being called and rt_llinfo being
removed, add checks everywhere to make sure we are using a route that is
not being removed.
ok bluhm@
|
|
|
|
|
|
|
| |
use memmove. While here, change some previous conversions to a simple
assignment.
ok deraadt@
|
|
|
|
|
|
| |
are not going to get a unicast route by accident.
ok mpi@
|
|
|
|
|
|
|
|
|
| |
causing ip_mforward() not to send packets to the userland multicast
routing daemon.
Reported and tested by Paul de Weerd.
ok bluhm@, claudio@
|
|
|
|
| |
ok mpi@
|
|
|
|
| |
ok krw@
|
|
|
|
|
|
|
|
| |
the netlock held. This also changes the prototypes of the *ctloutput
functions to take an mbuf instead of an mbuf pointer.
help, guidance from bluhm@ and mpi@
ok bluhm@
|
|
|
|
| |
ok mpi@
|
|
|
|
|
|
|
| |
routes. Beside the code simplification and removal, we also get to see
the multicast routes now in the route(8) utility.
ok mpi@
|
|
|
|
|
|
|
|
| |
configuration and instead use ifnet to store the configuration and
counters. With this we can safely use multicast routing daemons on
multiple domains without vif id colisions.
ok mpi@
|
|
|
|
|
|
|
|
| |
and using m_dup_pkt() instead of m_copym() with max_linkhdr space adjust
on packet sending to avoid more mbuf allocations.
with input from millert@ and mikeb@,
ok mikeb@
|
|
|
|
| |
ok rzalamena@, visa@
|
|
|
|
|
|
| |
splsoftnet.
ok mikeb@
|
|
|
|
| |
ok mpi@
|
| |
|
|
|
|
| |
ok bluhm@
|
|
|
|
|
|
|
| |
this way we save doing big tables walk and iterating tables that we don't
need to.
ok mpi@
|
|
|
|
| |
ok reyk@
|
|
|
|
| |
ok mpi@
|
|
|
|
|
|
|
| |
domains. This is one step towards supporting to run more than one multicast
socket in different domains at the same time.
ok mpi@
|
|
|
|
|
|
| |
calls won't fail anymore when doing from a different rdomain.
ok mpi@
|
| |
|
|
|
|
|
|
| |
NULL tests.
ok mpi@
|
|
|
|
| |
ok guenther
|
|
|
|
| |
ok mpi@ millert@
|
|
|
|
| |
Debug informations can already be accessed via mrtstat and pimstat.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Even pimd(8) no longer support them.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
the protocol queues.
It basically does what looutput() was doing but having a generic
function will allow us to get rid of the loopback hack overwwritting
the rt_ifp field of RTF_LOCAL routes.
ok mikeb@, dlg@, claudio@
|
|
|
|
| |
From David Hill; OK mpi@; tested kspillner@; tweaks bluhm@
|