From 75910aee3cd3e17aa9d32950c8cad5b50b964b62 Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Wed, 2 Feb 2000 17:53:53 +0000 Subject: make sure to nuke kludge entries, regardless from refcnt. --- sys/netinet6/in6.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sys/netinet6') 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; -- cgit v1.2.3