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
This commit is contained in:
Max Laier 2009-04-10 14:41:51 +00:00
parent def925c574
commit 876d5c038f

View File

@ -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) {