From 876d5c038fa2975bcb18e4904bd91ac8aafbbc1c Mon Sep 17 00:00:00 2001 From: Max Laier Date: Fri, 10 Apr 2009 14:41:51 +0000 Subject: [PATCH] Remove interfaces from IFG_ALL on detach. This cures a couple of pf panics when using the "self" keyword in tables or as ()-style host address and fixes "ifconfig -g all" output. PR: kern/130977, kern/131310 Submitted by: Mikolaj Golub MFC after: 3 days --- sys/net/if.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/if.c b/sys/net/if.c index 20627d363887..d0cbec5d6088 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -887,6 +887,7 @@ if_detach(struct ifnet *ifp) rt_ifannouncemsg(ifp, IFAN_DEPARTURE); EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL); + if_delgroup(ifp, IFG_ALL); IF_AFDATA_LOCK(ifp); for (dp = domains; dp; dp = dp->dom_next) {