freebsd-dev/sys/net
Lawrence Stewart 9a7e6bac47 Consumers of bpfdetach() expect it to remove all bpf_if structs from the
bpf_iflist list which reference the specified ifnet. The existing implementation
only removes the first matching bpf_if found in the list, effectively leaking
list entries if an ifnet has been bpfattach()ed multiple times with different
DLTs.

Fix the leak by performing the detach logic in a loop, stopping when all bpf_if
structs referencing the specified ifnet have been detached and removed from the
bpf_iflist list.

Whilst here, also:

- Remove the unnecessary "bp->bif_ifp == NULL" check, as a bpf_if should never
  exist in the list with a NULL ifnet pointer.

- Except when INVARIANTS is in the kernel config, silently ignore the case where
  no bpf_if referencing the specified ifnet is found, as it is harmless and does
  not require user attention.

Reviewed by:	csjp
MFC after:	1 week
2012-01-10 00:48:29 +00:00
..
bpf_buffer.c o Swap descriptions for net.bpf.bufsize and net.bpf.maxbufsize. 2010-11-24 05:50:19 +00:00
bpf_buffer.h
bpf_filter.c Clear the filter memory area before using it. Leaving it uninitialized may 2011-07-14 21:06:22 +00:00
bpf_jitter.c
bpf_jitter.h
bpf_zerocopy.c Introduce and use a new VM interface for temporarily pinning pages. This 2010-12-25 21:26:56 +00:00
bpf_zerocopy.h
bpf.c Consumers of bpfdetach() expect it to remove all bpf_if structs from the 2012-01-10 00:48:29 +00:00
bpf.h Revert r228986 until it can be reworked to avoid panicing the kernel when the 2011-12-31 07:21:28 +00:00
bpfdesc.h Implement flexible BPF timestamping framework. 2010-06-15 19:28:44 +00:00
bridgestp.c Set curvnet context in a callout-trigerred code path. 2011-06-07 20:46:03 +00:00
bridgestp.h Set curvnet context in a callout-trigerred code path. 2011-06-07 20:46:03 +00:00
ethernet.h
fddi.h
firewire.h
flowtable.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
flowtable.h allocate ipv6 flows from the ipv6 flow zone 2010-05-16 21:48:39 +00:00
ieee8023ad_lacp.c
ieee8023ad_lacp.h
if_arc.h
if_arcsubr.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
if_arp.h - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
if_atm.h
if_atmsubr.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
if_bridge.c In r191367 the need for if_free_type() was removed and a new member 2011-11-11 22:57:52 +00:00
if_bridgevar.h
if_clone.c - Use generic alloc_unr(9) allocator for if_clone, instead 2011-11-28 14:44:59 +00:00
if_clone.h - Use generic alloc_unr(9) allocator for if_clone, instead 2011-11-28 14:44:59 +00:00
if_dead.c
if_debug.c Add infrastructure to allow all frames/packets received on an interface 2011-07-03 12:22:02 +00:00
if_disc.c
if_dl.h
if_edsc.c
if_ef.c Add new tunable 'net.link.ifqmaxlen' to set default send interface 2010-05-03 07:32:50 +00:00
if_enc.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
if_enc.h
if_epair.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
if_ethersubr.c A major overhaul of the CARP implementation. The ip_carp.c was started 2011-12-16 12:16:56 +00:00
if_faith.c
if_fddisubr.c Tag mbufs of all incoming frames or packets with the interface's FIB 2011-07-03 16:08:38 +00:00
if_fwsubr.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
if_gif.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
if_gif.h MFP4: @176978-176982, 176984, 176990-176994, 177441 2010-04-29 11:52:42 +00:00
if_gre.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
if_gre.h gre(4) was using a field in the softc to detect possible recursion. 2011-06-18 09:34:03 +00:00
if_iso88025subr.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
if_lagg.c In r191367 the need for if_free_type() was removed and a new member 2011-11-11 22:57:52 +00:00
if_lagg.h Propagate the vlan eventis to the underlying interfaces/members so they can do initialization of hw related features. 2010-02-06 13:49:35 +00:00
if_llatbl.c Move arprequest() declaration to if_ether.h. 2012-01-08 13:34:00 +00:00
if_llatbl.h Make KBI changes required for future MFCing of inpcb rtentry / llentry caching. 2011-09-20 20:27:26 +00:00
if_llc.h
if_loop.c After some off-list discussion, revert a number of changes to the 2010-11-22 19:32:54 +00:00
if_media.c Fix typos - remove duplicate "the". 2011-02-21 09:01:34 +00:00
if_media.h Since r228571 CARP is no longer an interface. 2012-01-06 12:05:43 +00:00
if_mib.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
if_mib.h
if_sppp.h
if_spppfr.c Remove a few bits of FreeBSD 2.x compatibility code. 2011-11-14 18:21:27 +00:00
if_spppsubr.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
if_stf.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
if_stf.h
if_tap.c In r191367 the need for if_free_type() was removed and a new member 2011-11-11 22:57:52 +00:00
if_tap.h
if_tapvar.h
if_tun.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
if_tun.h
if_types.h A major overhaul of the CARP implementation. The ip_carp.c was started 2011-12-16 12:16:56 +00:00
if_var.h Convert the per-interface address list lock from a mutex to a reader/writer 2012-01-09 19:34:12 +00:00
if_vlan_var.h - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
if_vlan.c Refine last comment. 2012-01-05 11:42:34 +00:00
if.c Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
if.h Provide ABI compatibility shim to enable configuring of addresses 2011-12-21 12:39:08 +00:00
iso88025.h
netisr_internal.h Rework netisr policy mechanism so that per-protocol dispatch policies can 2011-05-24 12:34:19 +00:00
netisr.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
netisr.h Rework netisr policy mechanism so that per-protocol dispatch policies can 2011-05-24 12:34:19 +00:00
netmap_user.h Bring in support for netmap, a framework for very efficient packet 2011-11-17 12:17:39 +00:00
netmap.h 1. Fix the handling of link reset while in netmap more. 2011-12-05 12:06:53 +00:00
pfil.c
pfil.h small portability fix to build on linux/windows 2010-07-15 14:41:06 +00:00
pfkeyv2.h
ppp_defs.h
radix_mpath.c When the RADIX_MPATH kernel option is enabled, the RADIX_MPATH code tries 2011-08-25 04:31:20 +00:00
radix_mpath.h
radix.c whitespace cleanup 2010-07-15 14:41:59 +00:00
radix.h Make KBI changes required for future MFCing of inpcb rtentry / llentry caching. 2011-09-20 20:27:26 +00:00
raw_cb.c Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
raw_cb.h Pass the fibnum where we need filtering of the message on the 2011-09-28 13:48:36 +00:00
raw_usrreq.c Pass the fibnum where we need filtering of the message on the 2011-09-28 13:48:36 +00:00
route.c Simplify rtrequest(RTM_ADD): ifa can't be NULL after rt_getifa_fib(). 2011-12-15 12:49:10 +00:00
route.h Pass the fibnum where we need filtering of the message on the 2011-09-28 13:48:36 +00:00
rtsock.c Copy ifa->if_data to ifam->ifam_data. This was forgotten in r228571. 2012-01-08 17:11:53 +00:00
slcompress.c
slcompress.h
vnet.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
vnet.h Mfp4 CH=177255: 2011-02-11 14:17:58 +00:00
zlib.c
zlib.h Merge projects/enhanced_coredumps (r204346) into HEAD: 2010-03-02 06:58:58 +00:00
zutil.h Merge projects/enhanced_coredumps (r204346) into HEAD: 2010-03-02 06:58:58 +00:00