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:
Marko Zec 2009-05-22 22:22:21 +00:00
parent e2da1d0e79
commit 67da1f3d8d

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);