mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
MFC r206469:
In if_detach_internal() only try to do the detach run if if_attachdomain1() has actually succeeded to initialize and attach. There is a theoretical possibility to drop out early in if_attachdomain1() leaving the array uninitialized if we cannot get the lock. Discussed with: rwatson
This commit is contained in:
parent
407b19379c
commit
b0cf9f5f20
1 changed files with 1 additions and 1 deletions
|
|
@ -931,7 +931,7 @@ if_detach_internal(struct ifnet *ifp, int vmove)
|
|||
if_delgroups(ifp);
|
||||
|
||||
IF_AFDATA_LOCK(ifp);
|
||||
for (dp = domains; dp; dp = dp->dom_next) {
|
||||
for (dp = domains; ifp->if_afdata_initialized > 0 && dp; dp = dp->dom_next) {
|
||||
if (dp->dom_ifdetach && ifp->if_afdata[dp->dom_family])
|
||||
(*dp->dom_ifdetach)(ifp,
|
||||
ifp->if_afdata[dp->dom_family]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue