1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00
freebsd/sys/net
Robert Watson de5d99354f The advent of if_detach, allowing interface removal at runtime, makes it
possible for a panic to occur if BPF is in use on the interface at the
time of the call to if_detach.  This happens because BPF maintains pointers
to the struct ifnet describing the interface, which is freed by if_detach.

To correct this problem, a new call, bpfdetach, is introduced.  bpfdetach
locates BPF descriptor references to the interface, and NULLs them.  Other
BPF code is modified so that discovery of a NULL interface results in
ENXIO (already implemented for some calls).  Processes blocked on a BPF
call will also be woken up so that they can receive ENXIO.

Interface drivers that invoke bpfattach and if_detach must be modified to
also call bpfattach(ifp) before calling if_detach(ifp).  This is relevant
for buses that support hot removal, such as pccard and usb.  Patches to
all effected devices will not be committed, only to if_wi.c, due to
testing limitations.  To reproduce the crash, load up tcpdump on you
favorite pccard ethernet card, and then eject the card.  As some pccard
drivers do not invoke if_detach(ifp), this bug will not manifest itself
for those drivers.

Reviewed by:	wes
2000-03-19 05:42:34 +00:00
..
bpf_compat.h
bpf_filter.c Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
bpf.c The advent of if_detach, allowing interface removal at runtime, makes it 2000-03-19 05:42:34 +00:00
bpf.h The advent of if_detach, allowing interface removal at runtime, makes it 2000-03-19 05:42:34 +00:00
bpfdesc.h Introduce a new bd_seesent flag to the BPF descriptor, indicating whether or 2000-03-18 06:30:42 +00:00
bridge.c Update bridging code to the one already in -stable (this was 2000-02-08 14:53:55 +00:00
bridge.h Update bridging code to the one already in -stable (this was 2000-02-08 14:53:55 +00:00
bsd_comp.c
ethernet.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
fddi.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
hostcache.c
hostcache.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
if_arp.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
if_atm.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
if_atmsubr.c udp IPv6 support, IPv6/IPv4 tunneling support in kernel, 1999-12-07 17:39:16 +00:00
if_disc.c udp IPv6 support, IPv6/IPv4 tunneling support in kernel, 1999-12-07 17:39:16 +00:00
if_dl.h The "sdl_family" field in a "struct sockaddr_dl" will be equal 2000-03-01 02:46:25 +00:00
if_ef.c Allow if_ef driver to be compiled into kernel. 2000-01-23 03:35:11 +00:00
if_ethersubr.c Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
if_faith.c Remove #if NGIF > 0 and #if NFAITH > 0 as config already checks this. 2000-01-29 18:10:39 +00:00
if_fddisubr.c Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
if_gif.c IPv6 6to4 support. 2000-03-11 11:17:24 +00:00
if_gif.h udp IPv6 support, IPv6/IPv4 tunneling support in kernel, 1999-12-07 17:39:16 +00:00
if_iso88025subr.c M_PREPEND-related cleanups (unregisterifying struct mbuf *s). 1999-12-19 01:55:37 +00:00
if_llc.h
if_loop.c Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
if_media.c
if_media.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
if_mib.c
if_mib.h
if_ppp.c Remove some #if NFOO > 0 that are always true because of config rules. 2000-01-29 16:56:24 +00:00
if_ppp.h
if_pppvar.h Remove some #if NFOO > 0 that are always true because of config rules. 2000-01-29 16:56:24 +00:00
if_sl.c Fix possible SLIOCSUNIT panic 2000-02-20 21:03:53 +00:00
if_slvar.h
if_sppp.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
if_spppsubr.c Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
if_tun.c Track if_i{bytes,packets,errors}. 2000-02-16 04:04:36 +00:00
if_tun.h Implement TUN[GS]IFHEAD ioctls. Passing a non-zero int to TUNSIFHEAD 2000-01-23 01:47:12 +00:00
if_tunvar.h Implement TUN[GS]IFHEAD ioctls. Passing a non-zero int to TUNSIFHEAD 2000-01-23 01:47:12 +00:00
if_types.h KAME related header files additions and merges. 1999-11-05 14:41:39 +00:00
if_var.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
if_vlan_var.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
if_vlan.c m_pullup() frees the supplied mbuf on failure; we don't need to try 2000-02-07 06:18:38 +00:00
if.c This fixes a problem where the SIOCGIFCONF ioctl goes wrong. This 2000-02-28 19:30:25 +00:00
if.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
intrq.c Fix this so LINT compiles. There is no way this could have worked if 2000-01-29 16:13:08 +00:00
intrq.h Redo the intrq.c idea as 2000-01-27 23:37:39 +00:00
iso88025.h
net_osdep.c KAME netinet6 basic part(no IPsec,no V6 Multicast Forwarding, no UDP/TCP 1999-11-22 02:45:11 +00:00
net_osdep.h KAME netinet6 basic part(no IPsec,no V6 Multicast Forwarding, no UDP/TCP 1999-11-22 02:45:11 +00:00
netisr.h Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
pfkeyv2.h cosmetic change: sort function prototypes 2000-01-15 05:06:14 +00:00
ppp_comp.h
ppp_deflate.c
ppp_defs.h
ppp_tty.c Remove some #if NFOO > 0 that are always true because of config rules. 2000-01-29 16:56:24 +00:00
radix.c Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
radix.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
raw_cb.c
raw_cb.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
raw_usrreq.c
route.c Clear ro->ro_rt just after RTFREE(). 2000-01-15 07:27:12 +00:00
route.h Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
rtsock.c Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
slcompress.c Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
slcompress.h
slip.h
zlib.c Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
zlib.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00