From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 10 07:00:08 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 723A516A419 for ; Fri, 10 Aug 2007 07:00:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 47B7D13C459 for ; Fri, 10 Aug 2007 07:00:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l7A708aQ088802 for ; Fri, 10 Aug 2007 07:00:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l7A708tC088797; Fri, 10 Aug 2007 07:00:08 GMT (envelope-from gnats) Resent-Date: Fri, 10 Aug 2007 07:00:08 GMT Resent-Message-Id: <200708100700.l7A708tC088797@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tsurutani Naoki Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4A0516A417 for ; Fri, 10 Aug 2007 06:52:44 +0000 (UTC) (envelope-from turutani@polymer3.scphys.kyoto-u.ac.jp) Received: from omls-2c.kuins.net (omls-2c.kuins.net [192.50.9.4]) by mx1.freebsd.org (Postfix) with ESMTP id 6577613C48E for ; Fri, 10 Aug 2007 06:52:44 +0000 (UTC) (envelope-from turutani@polymer3.scphys.kyoto-u.ac.jp) Received: from imls-2b.kuins.net (imls-2b.imail.kuins.net [10.224.254.4] (may be forged)) by omls-2c.kuins.net (8.13.8/8.12.7) with ESMTP id l7A6qe19016585 for ; Fri, 10 Aug 2007 15:52:40 +0900 Received: from imls-2b.kuins.net (localhost.localdomain [127.0.0.1]) by imls-2b.kuins.net (8.12.11/8.12.10) with ESMTP id l7A6qemq019346 for ; Fri, 10 Aug 2007 15:52:40 +0900 Received: from polymer3.scphys.kyoto-u.ac.jp (h78.212.225.10.0.vlan.kuins.net [10.225.212.78]) by imls-2b.kuins.net (8.12.11/8.12.10) with ESMTP id l7A6qelg019343; Fri, 10 Aug 2007 15:52:40 +0900 Received: from polymer3.scphys.kyoto-u.ac.jp (localhost [127.0.0.1]) by polymer3.scphys.kyoto-u.ac.jp (8.14.1/8.14.1/20070410-1) with ESMTP id l7A6qXsq028990; Fri, 10 Aug 2007 15:52:34 +0900 (JST) (envelope-from turutani@polymer3.scphys.kyoto-u.ac.jp) Received: (from turutani@localhost) by polymer3.scphys.kyoto-u.ac.jp (8.14.1/8.14.1/Submit) id l7A6qXTw028989; Fri, 10 Aug 2007 15:52:33 +0900 (JST) (envelope-from turutani) Message-Id: <200708100652.l7A6qXTw028989@polymer3.scphys.kyoto-u.ac.jp> Date: Fri, 10 Aug 2007 15:52:33 +0900 (JST) From: Tsurutani Naoki To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/115372: "ipfw show" prints ill result. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tsurutani Naoki List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2007 07:00:08 -0000 >Number: 115372 >Category: bin >Synopsis: "ipfw show" prints ill result. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 10 07:00:07 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Tsurutani Naoki >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD polymer3.scphys.kyoto-u.ac.jp 6.2-STABLE FreeBSD 6.2-STABLE #10: Thu Aug 9 09:51:27 JST 2007 turutani@polymer3.scphys.kyoto-u.ac.jp:/usr/local/work/usr/obj/usr/src/sys/POLYMER i386 >Description: running "ipfw show" prints ill result when a rule like ${fwcmd} add 1 allow layer2 not mac-type ip is set. output is 00001 0 0 allow ip from any to any layer2 not not mac-type 0x0800 Two "not" present. >How-To-Repeat: add abobe rule in /etc/rc.firewall, run it, and the run "ipfw show". rules containing "mac-type" causes this. >Fix: This is introduced by rev.1.76.2.19 of src/sbin/ipfw/ipfw2.c. The older version does not produce this problem, as I checked. The structure of switch statement in show_ipfw() are changed at this revision, and "O_MACADDR2" is moved into deeper switch condition of the default condition of more global switch(). The first "not" is by "default" section, and the 2nd is by print_newports(). I do not know how to fix correctly. >Release-Note: >Audit-Trail: >Unformatted: