summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-02-02 17:53:53 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-02-02 17:53:53 +0000
commit75910aee3cd3e17aa9d32950c8cad5b50b964b62 (patch)
tree6ea99d203c05983dae30d71104598ed5148a3507 /sys/netinet6
parentbd7ba2ee16046dabae7b31d1d7c34e7bfebe939d (diff)
make sure to nuke kludge entries, regardless from refcnt.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 7f3f526445d..319ced98ec6 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.10 2000/02/02 17:16:52 itojun Exp $ */
+/* $OpenBSD: in6.c,v 1.11 2000/02/02 17:53:52 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@@ -1329,18 +1329,15 @@ in6_purgemkludge(ifp)
struct ifnet *ifp;
{
struct multi6_kludge *mk;
- struct in6_multi *in6m, *next;
+ struct in6_multi *in6m;
for (mk = in6_mk.lh_first; mk; mk = mk->mk_entry.le_next) {
if (mk->mk_ifp != ifp)
continue;
- for (in6m = mk->mk_head.lh_first; in6m; in6m = next) {
- next = in6m->in6m_entry.le_next;
- LIST_REMOVE(in6m, in6m_entry);
+ /* leave from all multicast groups joined */
+ while ((in6m = LIST_FIRST(&mk->mk_head)) != NULL)
in6_delmulti(in6m);
- in6m = NULL;
- }
LIST_REMOVE(mk, mk_entry);
free(mk, M_IPMADDR);
break;