Re: panic in ipfw code

2001-10-01 Thread Mike Barcroft

Daniel Rock <[EMAIL PROTECTED]> writes:
> 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")

This was reported by DES, and fixed moments before you sent out
your e-mail (with a delta identical to your patch).

Best regards,
Mike Barcroft

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



panic in ipfw code

2001-10-01 Thread Daniel Rock

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 -  1.170
+++ ip_fw.c 1 Oct 2001 17:20:39 -
@@ -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