Date: Sun, 25 Nov 2001 07:50:01 -0800 (PST) From: Peter Pentchev <roam@ringlet.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/32270: ipfw misreads 'skipto' rule number with leading zero Message-ID: <200111251550.fAPFo1159300@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/32270; it has been noted by GNATS. From: Peter Pentchev <roam@ringlet.net> To: Brian Candler <B.Candler@pobox.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111251550.fAPFo1159300>