Set ifp->if_afdata_initialized to 0 while holding IF_AFDATA_LOCK on ifp,

not after the lock has been released.

Reviewed by:	bz
Discussed with:	rwatson
This commit is contained in:
zec 2009-05-22 22:22:21 +00:00
parent 8cffa3fe21
commit ce69980b94

View File

@ -1022,8 +1022,8 @@ if_detach_internal(struct ifnet *ifp, int vmove)
(*dp->dom_ifdetach)(ifp,
ifp->if_afdata[dp->dom_family]);
}
IF_AFDATA_UNLOCK(ifp);
ifp->if_afdata_initialized = 0;
IF_AFDATA_UNLOCK(ifp);
if (!vmove)
ifq_detach(&ifp->if_snd);