aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_ifattach.c
diff options
context:
space:
mode:
authorStephen Hurd <shurd@FreeBSD.org>2018-05-02 19:36:29 +0000
committerStephen Hurd <shurd@FreeBSD.org>2018-05-02 19:36:29 +0000
commitf3e1324b41e54f1a3b148541ddcacdbe647d2214 (patch)
tree605fb041714cffab9218069efe9ade83faf4843d /sys/netinet6/in6_ifattach.c
parentadb947a67ad23f81deea85fd765d98493db1713d (diff)
downloadsrc-f3e1324b41e54f1a3b148541ddcacdbe647d2214.tar.gz
src-f3e1324b41e54f1a3b148541ddcacdbe647d2214.zip
Notes
Diffstat (limited to 'sys/netinet6/in6_ifattach.c')
-rw-r--r--sys/netinet6/in6_ifattach.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 2a8ba038096c..87fc501e39d3 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -846,13 +846,13 @@ in6_tmpaddrtimer(void *arg)
static void
in6_purgemaddrs(struct ifnet *ifp)
{
- LIST_HEAD(,in6_multi) purgeinms;
- struct in6_multi *inm, *tinm;
+ struct in6_multi_head purgeinms;
+ struct in6_multi *inm;
struct ifmultiaddr *ifma;
- LIST_INIT(&purgeinms);
+ SLIST_INIT(&purgeinms);
IN6_MULTI_LOCK();
-
+ IN6_MULTI_LIST_LOCK();
/*
* Extract list of in6_multi associated with the detaching ifp
* which the PF_INET6 layer is about to release.
@@ -865,17 +865,13 @@ in6_purgemaddrs(struct ifnet *ifp)
ifma->ifma_protospec == NULL)
continue;
inm = (struct in6_multi *)ifma->ifma_protospec;
- LIST_INSERT_HEAD(&purgeinms, inm, in6m_entry);
+ in6m_rele_locked(&purgeinms, inm);
}
IF_ADDR_RUNLOCK(ifp);
-
- LIST_FOREACH_SAFE(inm, &purgeinms, in6m_entry, tinm) {
- LIST_REMOVE(inm, in6m_entry);
- in6m_release_locked(inm);
- }
mld_ifdetach(ifp);
-
+ IN6_MULTI_LIST_UNLOCK();
IN6_MULTI_UNLOCK();
+ in6m_release_list_deferred(&purgeinms);
}
void