From owner-svn-src-head@FreeBSD.ORG Wed Dec 10 08:22:51 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B852B1065677; Wed, 10 Dec 2008 08:22:51 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A45C38FC17; Wed, 10 Dec 2008 08:22:51 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBA8Mp3W023108; Wed, 10 Dec 2008 08:22:51 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBA8MpI1023107; Wed, 10 Dec 2008 08:22:51 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812100822.mBA8MpI1023107@svn.freebsd.org> From: Kip Macy Date: Wed, 10 Dec 2008 08:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185844 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 08:22:51 -0000 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);