1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

Revert r260548. We really should not use IPFW_WLOCK() here

but this requires some more playing with IPFW_UH_WLOCK(). Leave till later.
This commit is contained in:
Alexander V. Chernikov 2014-01-11 18:27:34 +00:00
parent 27ff748ea1
commit c254a2091c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260551

View File

@ -67,11 +67,11 @@ ifaddr_change(void *arg __unused, struct ifnet *ifp)
KASSERT(curvnet == ifp->if_vnet,
("curvnet(%p) differs from iface vnet(%p)", curvnet, ifp->if_vnet));
chain = &V_layer3_chain;
IPFW_RLOCK(chain);
IPFW_WLOCK(chain);
/* Check every nat entry... */
LIST_FOREACH(ptr, &chain->nat, _next) {
/* ...using nic 'ifp->if_xname' as dynamic alias address. */
if (strncmp(ptr->if_name, if_name(ifp), IF_NAMESIZE) != 0)
if (strncmp(ptr->if_name, ifp->if_xname, IF_NAMESIZE) != 0)
continue;
if_addr_rlock(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
@ -85,7 +85,7 @@ ifaddr_change(void *arg __unused, struct ifnet *ifp)
}
if_addr_runlock(ifp);
}
IPFW_RUNLOCK(chain);
IPFW_WUNLOCK(chain);
}
/*