svn commit: r260551 - head/sys/netpfil/ipfw

Alexander V. Chernikov melifaro at FreeBSD.org
Sat Jan 11 18:27:35 UTC 2014


Author: melifaro
Date: Sat Jan 11 18:27:34 2014
New Revision: 260551
URL: http://svnweb.freebsd.org/changeset/base/260551

Log:
  Revert r260548. We really should not use IPFW_WLOCK() here
  but this requires some more playing with IPFW_UH_WLOCK(). Leave till later.

Modified:
  head/sys/netpfil/ipfw/ip_fw_nat.c

Modified: head/sys/netpfil/ipfw/ip_fw_nat.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_nat.c	Sat Jan 11 17:37:53 2014	(r260550)
+++ head/sys/netpfil/ipfw/ip_fw_nat.c	Sat Jan 11 18:27:34 2014	(r260551)
@@ -67,11 +67,11 @@ ifaddr_change(void *arg __unused, struct
 	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
 		}
 		if_addr_runlock(ifp);
 	}
-	IPFW_RUNLOCK(chain);
+	IPFW_WUNLOCK(chain);
 }
 
 /*


More information about the svn-src-head mailing list