From owner-freebsd-ipfw@FreeBSD.ORG Fri Aug 10 08:10:11 2007 Return-Path: Delivered-To: freebsd-ipfw@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1738A16A421 for ; Fri, 10 Aug 2007 08:10:11 +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 0109513C46C for ; Fri, 10 Aug 2007 08:10:11 +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 l7A8AAnV093705 for ; Fri, 10 Aug 2007 08:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l7A8AAMF093704; Fri, 10 Aug 2007 08:10:10 GMT (envelope-from gnats) Date: Fri, 10 Aug 2007 08:10:10 GMT Message-Id: <200708100810.l7A8AAMF093704@freefall.freebsd.org> To: freebsd-ipfw@FreeBSD.org From: "Andrey V. Elsukov" Cc: Subject: Re: bin/115372: [ipfw]: "ipfw show" prints ill result. X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Andrey V. Elsukov" List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2007 08:10:11 -0000 The following reply was made to PR bin/115372; it has been noted by GNATS. From: "Andrey V. Elsukov" To: bug-followup@FreeBSD.org, turutani@scphys.kyoto-u.ac.jp Cc: Maxim Konovalov , Oleg Bulyzhin Subject: Re: bin/115372: [ipfw]: "ipfw show" prints ill result. Date: Fri, 10 Aug 2007 11:50:02 +0400 This is a multi-part message in MIME format. --------------040106090808050103000507 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Hi, this bug was not introduced by mentioned commit. You can see this bug also with following rules: # ipfw add allow ip from any to any not ipid 1,2,3,4,5 # ipfw add allow ip from any to any not ipttl 1,2,3,4,5 # ipfw add allow ip from any to any not iplen 1,2,3,4,5 and "not tcpdatalen 1,2,3,4", "not tagged 1,2,3,4". Can you try this patch? -- WBR, Andrey V. Elsukov --------------040106090808050103000507 Content-Type: text/plain; name="ipfw2.c.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ipfw2.c.diff.txt" --- src/sbin/ipfw/ipfw2.c.orig 2007-06-18 21:52:37.000000000 +0400 +++ src/sbin/ipfw/ipfw2.c 2007-08-09 20:54:21.749670029 +0400 @@ -668,8 +668,6 @@ int i; char const *sep; - if (cmd->o.len & F_NOT) - printf(" not"); if (opcode != 0) { sep = match_value(_port_name, opcode); if (sep == NULL) @@ -1755,6 +1753,8 @@ show_prerequisites(&flags, HAVE_PROTO|HAVE_SRCIP, 0); if ((cmd->len & F_OR) && !or_block) printf(" {"); + if (cmd->len & F_NOT) + printf(" not"); print_newports((ipfw_insn_u16 *)cmd, proto, (flags & HAVE_OPTIONS) ? cmd->opcode : 0); break; --------------040106090808050103000507--