svn commit: r184797 - head/sys/netinet
Bjoern A. Zeeb
bz at FreeBSD.org
Sun Nov 9 06:06:45 PST 2008
Author: bz
Date: Sun Nov 9 14:06:44 2008
New Revision: 184797
URL: http://svn.freebsd.org/changeset/base/184797
Log:
For consistency work on the local object passed into the function for the
lock operation instead using the global name.
Submitted by: ganbold
MFC after: 2 months
Modified:
head/sys/netinet/ip_fw2.c
Modified: head/sys/netinet/ip_fw2.c
==============================================================================
--- head/sys/netinet/ip_fw2.c Sun Nov 9 14:06:17 2008 (r184796)
+++ head/sys/netinet/ip_fw2.c Sun Nov 9 14:06:44 2008 (r184797)
@@ -1803,14 +1803,14 @@ add_table_entry(struct ip_fw_chain *ch,
ent->addr.sin_len = ent->mask.sin_len = 8;
ent->mask.sin_addr.s_addr = htonl(mlen ? ~((1 << (32 - mlen)) - 1) : 0);
ent->addr.sin_addr.s_addr = addr & ent->mask.sin_addr.s_addr;
- IPFW_WLOCK(&V_layer3_chain);
+ IPFW_WLOCK(ch);
if (rnh->rnh_addaddr(&ent->addr, &ent->mask, rnh, (void *)ent) ==
NULL) {
- IPFW_WUNLOCK(&V_layer3_chain);
+ IPFW_WUNLOCK(ch);
free(ent, M_IPFW_TBL);
return (EEXIST);
}
- IPFW_WUNLOCK(&V_layer3_chain);
+ IPFW_WUNLOCK(ch);
return (0);
}
More information about the svn-src-head
mailing list