Hi,

I wondered nobody noticed this bug so far.
The kernel panics if you feed him with unnumbered firewall rules
(like "ipfw add allow all from any to any")

Fix is simple. In the code the wrong loop variable was used:

Index: ip_fw.c
===================================================================
RCS file: /data/cvs/src/sys/netinet/ip_fw.c,v
retrieving revision 1.170
diff -u -r1.170 ip_fw.c
--- ip_fw.c     27 Sep 2001 23:44:26 -0000      1.170
+++ ip_fw.c     1 Oct 2001 17:20:39 -0000
@@ -1654,9 +1654,9 @@
 
        /* If entry number is 0, find highest numbered rule and add 100 */
        if (ftmp->fw_number == 0) {
-               LIST_FOREACH(ftmp, head, next) {
-                       if (ftmp->fw_number != IPFW_DEFAULT_RULE)
-                               nbr = ftmp->fw_number;
+               LIST_FOREACH(fcp, head, next) {
+                       if (fcp->fw_number != IPFW_DEFAULT_RULE)
+                               nbr = fcp->fw_number;
                        else
                                break;
                }


-- 
Daniel

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to