freebsd-skq/sys/netinet6
Bruce M Simpson ec002fee99 Implement reference counting for ifmultiaddr, in_multi, and in6_multi
structures. Detect when ifnet instances are detached from the network
stack and perform appropriate cleanup to prevent memory leaks.

This has been implemented in such a way as to be backwards ABI compatible.
Kernel consumers are changed to use if_delmulti_ifma(); in_delmulti()
is unable to detect interface removal by design, as it performs searches
on structures which are removed with the interface.

With this architectural change, the panics FreeBSD users have experienced
with carp and pfsync should be resolved.

Obtained from:	p4 branch bms_netdev
Reviewed by:	andre
Sponsored by:	Garance A Drosehn
Idea from:	NetBSD
MFC after:	1 month
2007-03-20 00:36:10 +00:00
..
ah6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ah_aesxcbcmac.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ah_aesxcbcmac.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ah_core.c MFC after: 3 days 2007-02-05 11:05:41 +00:00
ah_input.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ah_output.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ah.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
dest6.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp_aesctr.c Marked these as packed correctly 2007-01-12 07:20:25 +00:00
esp_aesctr.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp_core.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
esp_input.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
esp_output.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
esp_rijndael.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
esp_rijndael.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
frag6.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
icmp6.c In the ICMP6 path to handle FQDN 'who-are-you' queries, check that the 2007-02-10 12:25:19 +00:00
icmp6.h
in6_cksum.c Marked these as packed correctly 2007-01-12 07:20:25 +00:00
in6_gif.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
in6_gif.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
in6_ifattach.c Revert the default value of net.inet6.ip6.auto_linklocal to 1. 2006-10-13 12:41:36 +00:00
in6_ifattach.h sync with KAME regarding NDP 2005-10-21 16:23:01 +00:00
in6_pcb.c Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
in6_pcb.h Modify in6_pcbpurgeif0() to accept a pcbinfo structure rather than a pcb 2006-04-23 15:06:16 +00:00
in6_proto.c Make IPv6 multicast forwarding dynamically loadable from a GENERIC kernel. 2007-02-24 11:38:47 +00:00
in6_rmx.c Complete timebase (time_second -> time_uptime) conversion. 2006-07-05 23:37:21 +00:00
in6_src.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
in6_var.h MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
in6.c Make IPv6 multicast forwarding dynamically loadable from a GENERIC kernel. 2007-02-24 11:38:47 +00:00
in6.h This comment on various IPPORT_ defines was copied from in.h and 2006-03-28 12:51:22 +00:00
ip6_ecn.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_forward.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
ip6_id.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_input.c Make IPv6 multicast forwarding dynamically loadable from a GENERIC kernel. 2007-02-24 11:38:47 +00:00
ip6_mroute.c Add comments about common idioms for cleanup pass at a later date. 2007-02-28 21:58:37 +00:00
ip6_mroute.h Remove code which would never be used, viz a viz Quality-of-Service; 2007-02-28 20:32:25 +00:00
ip6_output.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ip6_var.h Make IPv6 multicast forwarding dynamically loadable from a GENERIC kernel. 2007-02-24 11:38:47 +00:00
ip6.h
ip6protosw.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipcomp6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipcomp_core.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ipcomp_input.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ipcomp_output.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ipcomp.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipsec6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipsec.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
ipsec.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
mld6_var.h sync with KAME regarding NDP 2005-10-21 16:23:01 +00:00
mld6.c Implement reference counting for ifmultiaddr, in_multi, and in6_multi 2007-03-20 00:36:10 +00:00
nd6_nbr.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
nd6_rtr.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
nd6.c ng_iface requiers neighbor cache as well. 2007-02-03 09:34:36 +00:00
nd6.h sync with KAME regarding NDP 2005-10-21 16:23:01 +00:00
pim6_var.h Remove public declarations of variables that were forgotten when they were 2005-08-10 07:10:02 +00:00
pim6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
raw_ip6.c Fix tinderbox. ip6_mrouter should be defined in raw_ip6.c as it is 2007-02-24 21:09:35 +00:00
raw_ip6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
route6.c scope cleanup. with this change 2005-07-25 12:31:43 +00:00
scope6_var.h scope cleanup. with this change 2005-07-25 12:31:43 +00:00
scope6.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
sctp6_usrreq.c - errno -> becomes error in sctp_output.c and sctputil.c 2007-03-19 06:53:02 +00:00
sctp6_var.h - errno -> becomes error in sctp_output.c and sctputil.c 2007-03-19 06:53:02 +00:00
tcp6_var.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
udp6_output.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
udp6_usrreq.c Rename two identically named log_in_vain variables: tcp_input.c's static 2007-02-20 10:20:03 +00:00
udp6_var.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00