From e08ab8576d61579045b7532978af2f9fed09f457 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Wed, 10 Dec 2008 08:22:51 +0000 Subject: [PATCH] don't reference if_addr_mtx directly --- sys/netinet/ip_fw_nat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_fw_nat.c b/sys/netinet/ip_fw_nat.c index 732b6ae2d6c0..8bb114bc9fa5 100644 --- a/sys/netinet/ip_fw_nat.c +++ b/sys/netinet/ip_fw_nat.c @@ -91,7 +91,7 @@ ifaddr_change(void *arg __unused, struct ifnet *ifp) LIST_FOREACH(ptr, &V_layer3_chain.nat, _next) { /* ...using nic 'ifp->if_xname' as dynamic alias address. */ if (strncmp(ptr->if_name, ifp->if_xname, IF_NAMESIZE) == 0) { - mtx_lock(&ifp->if_addr_mtx); + IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { if (ifa->ifa_addr == NULL) continue; @@ -101,7 +101,7 @@ ifaddr_change(void *arg __unused, struct ifnet *ifp) (ifa->ifa_addr))->sin_addr; LibAliasSetAddress(ptr->lib, ptr->ip); } - mtx_unlock(&ifp->if_addr_mtx); + IF_ADDR_LOCK(ifp); } } IPFW_WUNLOCK(&V_layer3_chain);