From 9a2b9f20ddfa5fa944dd9dbbd0bfbca48f2fa0cc Mon Sep 17 00:00:00 2001 From: bz Date: Sun, 9 Nov 2008 14:06:44 +0000 Subject: 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 --- sys/netinet/ip_fw2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 64903ea..f7c5735 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -1803,14 +1803,14 @@ add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, 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); } -- cgit v1.1