Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Nov 2001 07:24:44 -0800 (PST)
From:      Brian Candler <B.Candler@pobox.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/32270: ipfw misreads 'skipto' rule number with leading zero
Message-ID:  <200111251524.fAPFOir56831@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111251524.fAPFOir56831>