Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2008 08:22:51 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185844 - head/sys/netinet
Message-ID:  <200812100822.mBA8MpI1023107@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Wed Dec 10 08:22:51 2008
New Revision: 185844
URL: http://svn.freebsd.org/changeset/base/185844

Log:
  don't reference if_addr_mtx directly

Modified:
  head/sys/netinet/ip_fw_nat.c

Modified: head/sys/netinet/ip_fw_nat.c
==============================================================================
--- head/sys/netinet/ip_fw_nat.c	Wed Dec 10 08:01:10 2008	(r185843)
+++ head/sys/netinet/ip_fw_nat.c	Wed Dec 10 08:22:51 2008	(r185844)
@@ -91,7 +91,7 @@ ifaddr_change(void *arg __unused, struct
 	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
 				    (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);	



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812100822.mBA8MpI1023107>