Date: Mon, 01 Oct 2001 19:37:39 +0200 From: Daniel Rock <D.Rock@t-online.de> To: current@freebsd.org Subject: panic in ipfw code Message-ID: <3BB8A9E3.7058FBEA@t-online.de>
next in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BB8A9E3.7058FBEA>