From owner-freebsd-current Mon Oct 1 10:41:30 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailout03.sul.t-online.de (mailout03.sul.t-online.com [194.25.134.81]) by hub.freebsd.org (Postfix) with ESMTP id E581137B413 for ; Mon, 1 Oct 2001 10:37:55 -0700 (PDT) Received: from fwd02.sul.t-online.de by mailout03.sul.t-online.de with smtp id 15o70q-0002qW-00; Mon, 01 Oct 2001 19:37:52 +0200 Received: from server.rock.net (340029380333-0001@[217.224.24.82]) by fmrl02.sul.t-online.com with esmtp id 15o70j-1y4L4qC; Mon, 1 Oct 2001 19:37:45 +0200 Received: from t-online.de (server [172.23.7.1]) by server.rock.net (8.11.6/8.11.6/Rock) with ESMTP id f91HbeK62213 for ; Mon, 1 Oct 2001 19:37:40 +0200 (MEST) Message-ID: <3BB8A9E3.7058FBEA@t-online.de> Date: Mon, 01 Oct 2001 19:37:39 +0200 From: Daniel Rock X-Mailer: Mozilla 4.76 [de] (X11; U; SunOS 5.8 i86pc) X-Accept-Language: de, en MIME-Version: 1.0 To: current@freebsd.org Subject: panic in ipfw code Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Sender: 340029380333-0001@t-dialin.net Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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