]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement reference counting for ifmultiaddr, in_multi, and in6_multi
authorBruce M Simpson <bms@FreeBSD.org>
Tue, 20 Mar 2007 00:36:10 +0000 (00:36 +0000)
committerBruce M Simpson <bms@FreeBSD.org>
Tue, 20 Mar 2007 00:36:10 +0000 (00:36 +0000)
commitec002fee9957c147af90cc5159ef6d2f5538dc73
treea99ae311b25195ab5b7322b739f496dec7a7cd69
parent9239bab2fe997237304f8b04476a165276571595
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
sys/net/if.c
sys/net/if_var.h
sys/netgraph/ng_ether.c
sys/netinet/in.c
sys/netinet/in_var.h
sys/netinet6/mld6.c