From owner-freebsd-bugs Sun Nov 25 7:50: 4 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 5557137B417 for ; Sun, 25 Nov 2001 07:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAPFo1159300; Sun, 25 Nov 2001 07:50:01 -0800 (PST) (envelope-from gnats) Date: Sun, 25 Nov 2001 07:50:01 -0800 (PST) Message-Id: <200111251550.fAPFo1159300@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: bin/32270: ipfw misreads 'skipto' rule number with leading zero Reply-To: Peter Pentchev 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 The following reply was made to PR bin/32270; it has been noted by GNATS. From: Peter Pentchev To: Brian Candler Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/32270: ipfw misreads 'skipto' rule number with leading zero Date: Sun, 25 Nov 2001 17:42:21 +0200 On Sun, Nov 25, 2001 at 07:24:44AM -0800, Brian Candler wrote: > > >Number: 32270 > >Category: bin > >Synopsis: ipfw misreads 'skipto' rule number with leading zero > >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') [snip] > > >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 I cannot reproduce this here: [root@straylight:v3 ~]# ipfw list 65535 allow ip from any to any [root@straylight:v3 ~]# ipfw add 00500 skipto 02999 ip from 1.2.3.4 to 5.6.7.8 00500 skipto 2999 ip from 1.2.3.4 to 5.6.7.8 [root@straylight:v3 ~]# ipfw add 00600 skipto 03777 ip from 1.2.3.4 to 5.6.7.8 00600 skipto 3777 ip from 1.2.3.4 to 5.6.7.8 [root@straylight:v3 ~]# ipfw list 00500 skipto 2999 ip from 1.2.3.4 to 5.6.7.8 00600 skipto 3777 ip from 1.2.3.4 to 5.6.7.8 65535 allow ip from any to any [root@straylight:v3 ~]# Are you running FreeBSD 4.4-RELEASE? If so, could you update to -stable and see if the problem is really fixed? I cannot find anything related to parsing rule numbers in the ipfw.c changes after 4.4-RELEASE, though.. G'luck, Peter -- No language can express every thought unambiguously, least of all this one. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message