mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Acquire interfce address list lock while walking the interface address
list during tun device initialization. MFC after: 2 weeks
This commit is contained in:
parent
77ee4c0e00
commit
84f6005ccf
1 changed files with 2 additions and 0 deletions
|
|
@ -520,6 +520,7 @@ tuninit(struct ifnet *ifp)
|
|||
getmicrotime(&ifp->if_lastchange);
|
||||
|
||||
#ifdef INET
|
||||
IF_ADDR_LOCK(ifp);
|
||||
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
if (ifa->ifa_addr->sa_family == AF_INET) {
|
||||
struct sockaddr_in *si;
|
||||
|
|
@ -535,6 +536,7 @@ tuninit(struct ifnet *ifp)
|
|||
mtx_unlock(&tp->tun_mtx);
|
||||
}
|
||||
}
|
||||
IF_ADDR_UNLOCK(ifp);
|
||||
#endif
|
||||
return (error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue