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);
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to