diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-04-23 15:06:16 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-04-23 15:06:16 +0000 |
commit | 00366b63e338baa890f4da88ce2dbd32bbafa7b8 (patch) | |
tree | 268f011dc5e5edfc9869c10cea4131a82291fadb /sys/netinet6/in6_ifattach.c | |
parent | 281dc6494fa6a185632ea615b685424e90ab7df4 (diff) | |
download | FreeBSD-src-00366b63e338baa890f4da88ce2dbd32bbafa7b8.zip FreeBSD-src-00366b63e338baa890f4da88ce2dbd32bbafa7b8.tar.gz |
Modify in6_pcbpurgeif0() to accept a pcbinfo structure rather than a pcb
list head structure; this improves congruence to IPv4, and also allows
in6_pcbpurgeif0() to lock the pcbinfo. Modify in6_pcbpurgeif0() to lock
the pcbinfo before iterating the pcb list, use queue(9)'s LIST_FOREACH()
for the iteration, and to lock individual inpcb's while manipulating
them.
MFC after: 3 months
Diffstat (limited to 'sys/netinet6/in6_ifattach.c')
-rw-r--r-- | sys/netinet6/in6_ifattach.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 6b7d022..4d822f2 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -794,10 +794,8 @@ in6_ifdetach(ifp) /* leave from all multicast groups joined */ - if (udbinfo.listhead != NULL) - in6_pcbpurgeif0(LIST_FIRST(udbinfo.listhead), ifp); - if (ripcbinfo.listhead != NULL) - in6_pcbpurgeif0(LIST_FIRST(ripcbinfo.listhead), ifp); + in6_pcbpurgeif0(&udbinfo, ifp); + in6_pcbpurgeif0(&ripcbinfo, ifp); for (in6m = LIST_FIRST(&in6_multihead); in6m; in6m = in6m_next) { in6m_next = LIST_NEXT(in6m, in6m_entry); |