Don't use if_maddr_rlock() in tuntap(4), use epoch(9) directly instead.
This commit is contained in:
parent
4b24e5b1ef
commit
73c96bbeac
@ -1151,6 +1151,7 @@ tuninit(struct ifnet *ifp)
|
||||
{
|
||||
struct tuntap_softc *tp = ifp->if_softc;
|
||||
#ifdef INET
|
||||
struct epoch_tracker et;
|
||||
struct ifaddr *ifa;
|
||||
#endif
|
||||
|
||||
@ -1162,7 +1163,7 @@ tuninit(struct ifnet *ifp)
|
||||
ifp->if_flags |= IFF_UP;
|
||||
getmicrotime(&ifp->if_lastchange);
|
||||
#ifdef INET
|
||||
if_addr_rlock(ifp);
|
||||
NET_EPOCH_ENTER(et);
|
||||
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
if (ifa->ifa_addr->sa_family == AF_INET) {
|
||||
struct sockaddr_in *si;
|
||||
@ -1176,7 +1177,7 @@ tuninit(struct ifnet *ifp)
|
||||
tp->tun_flags |= TUN_DSTADDR;
|
||||
}
|
||||
}
|
||||
if_addr_runlock(ifp);
|
||||
NET_EPOCH_EXIT(et);
|
||||
#endif
|
||||
TUN_UNLOCK(tp);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user