From owner-freebsd-bugs Sun Nov 25 7:30: 5 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id CBFD937B416 for ; Sun, 25 Nov 2001 07:30:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAPFU0757295; Sun, 25 Nov 2001 07:30:00 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8AEE337B416 for ; Sun, 25 Nov 2001 07:24:44 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAPFOir56831; Sun, 25 Nov 2001 07:24:44 -0800 (PST) (envelope-from nobody) Message-Id: <200111251524.fAPFOir56831@freefall.freebsd.org> Date: Sun, 25 Nov 2001 07:24:44 -0800 (PST) From: Brian Candler To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/32270: ipfw misreads 'skipto' rule number with leading zero Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 32270 >Category: bin >Synopsis: ipfw misreads 'skipto' rule number with leading zero >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 25 07:30:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Brian Candler >Release: FreeBSD-4.4 >Organization: >Environment: >Description: 'ipfw list' displays rule numbers as 5 digits with leading zeros. 'ipfw add nnnnn' accepts rule numbers with leading zeros. However, 'ipfw ... skipto nnnnn ...' fails when given a number with a leading zero; it appears to treat it as octal, but silently ignores non-octal digits (e.g. 02999 is accepted but treated as '2') The man page does not say that 'skipto' treats rule numbers any differently than elsewhere. Trivial to workaround - by dropping the leading zero - but wasted time trying to work out why my ruleset wasn't working! >How-To-Repeat: # ipfw add 00500 skipto 02999 ip from 1.2.3.4 to 5.6.7.8 00500 skipto 2 ip from 1.2.3.4 to 5.6.7.8 # ipfw add 00600 skipto 03777 ip from 1.2.3.4 to 5.6.7.8 00600 skipto 2047 ip from 1.2.3.4 to 5.6.7.8 # ipfw list ... 00500 skipto 2 ip from 1.2.3.4 to 5.6.7.8 00600 skipto 2047 ip from 1.2.3.4 to 5.6.7.8 >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message