From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 19 22:30:14 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA1D837B404 for ; Sat, 19 Jul 2003 22:30:14 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEFE443FBD for ; Sat, 19 Jul 2003 22:30:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h6K5UDUp034277 for ; Sat, 19 Jul 2003 22:30:13 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h6K5UDK6034276; Sat, 19 Jul 2003 22:30:13 -0700 (PDT) Resent-Date: Sat, 19 Jul 2003 22:30:13 -0700 (PDT) Resent-Message-Id: <200307200530.h6K5UDK6034276@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, Andy Gilligan Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F01C737B404 for ; Sat, 19 Jul 2003 22:25:00 -0700 (PDT) Received: from mx1.evo6.net (mx1.evo6.net [80.76.194.10]) by mx1.FreeBSD.org (Postfix) with SMTP id 4FCEF43FCB for ; Sat, 19 Jul 2003 22:24:59 -0700 (PDT) (envelope-from andy@mx1.evo6.net) Received: (qmail 85586 invoked by uid 1001); 20 Jul 2003 05:24:57 -0000 Message-Id: <20030720052457.68999.qmail@mx1.evo6.net> Date: 20 Jul 2003 05:24:57 -0000 From: Andy Gilligan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: stable@FreeBSD.org Subject: bin/54649: [PATCH] ipfw2 fails with 'bad command' error X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andy Gilligan List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 05:30:15 -0000 >Number: 54649 >Category: bin >Synopsis: [PATCH] ipfw2 fails with 'bad command' error >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 19 22:30:13 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Andy Gilligan >Release: FreeBSD 4.8-STABLE i386 >Organization: >Environment: System: FreeBSD vega 4.8-STABLE FreeBSD 4.8-STABLE #13: Sun Jul 20 01:01:07 BST 2003 root@vega:/usr/obj/usr/src/sys/VEGA i386 >Description: When using a program to preprocess rules, /sbin/ipfw will fail with a 'bad command' error if those rules contain any pipe or queue definitions. This only affects IPFW2. >How-To-Repeat: Create /etc/ipfw.rules containing: pipe 1 config bw 500kbit/s add pipe 1 all from any to any Then execute: # ipfw -p cat /etc/ipfw.rules command is cat Line 2: bad command `pipe' Using any preprocessor that generates those rules will give the same error. >Fix: Correctly initialise the 'do_pipe' variable in ipfw_main() Index: sbin/ipfw/ipfw2.c =================================================================== RCS file: /data/cvs/freebsd/src/sbin/ipfw/ipfw2.c,v retrieving revision 1.4.2.16 diff -u -r1.4.2.16 ipfw2.c --- sbin/ipfw/ipfw2.c 17 Jul 2003 06:03:39 -0000 1.4.2.16 +++ sbin/ipfw/ipfw2.c 20 Jul 2003 04:51:28 -0000 @@ -3591,6 +3591,7 @@ char **av, **save_av; int do_acct = 0; /* Show packet/byte count */ int do_force = 0; /* Don't ask for confirmation */ + do_pipe = 0; #define WHITESP " \t\f\v\n\r" if (oldac == 0) >Release-Note: >Audit-Trail: >Unformatted: