Date: Mon, 15 Sep 1997 11:23:46 -0500 (CDT) From: Daniel Ortmann <ortmann@sparc.isl.net> To: current@freebsd.com Subject: ipfw outputs 0's with default numbering Message-ID: <199709151623.LAA01132@watcher.isl.net>
next in thread | raw e-mail | index | archive | help
SUMMARY:
Some of the sequence numbers output by ipfw look a bit goofy.
PROBLEM:
If I do the following ...
ipfw -f flush
ipfw add 1000 pass all from 127.0.0.1 to 127.0.0.1
ipfw add pass all from ${ip} to ${net}:${mask}
Then I get output as follows ...
Flushed all rules.
01000 allow ip from 127.0.0.1 to 127.0.0.1
00000 allow ip from 199.3.25.128 to 199.3.25.0/24
00000 allow ip from 199.3.25.0/24 to 199.3.25.128
00000 allow tcp from any to any established
...
EXPECTED:
But "ipfw list" shows the following ...
01000 allow ip from 127.0.0.1 to 127.0.0.1
01100 allow ip from 199.3.25.128 to 199.3.25.0/24
01200 allow ip from 199.3.25.0/24 to 199.3.25.128
01300 allow tcp from any to any established
...
I expected to see the real sequence numbers instead of just 0's.
CODE:
Here's the area of ipfw.c that looks suspicious to me ...
*** ipfw.c Sat Aug 9 17:09:31 1997
--- ipfw_local.c Mon Sep 15 11:19:38 1997
***************
*** 174,180 ****
--- 174,182 ----
if (do_resolv)
setservent(1/*stayopen*/);
+ /* ### */
printf("%05u ", chain->fw_number);
+ /* ### */
if (do_acct)
printf("%10lu %10lu ",chain->fw_pcnt,chain->fw_bcnt);
***************
*** 787,796 ****
--- 789,800 ----
av++; ac--;
+ /* ### */
/* Rule number */
if (ac && isdigit(**av)) {
rule.fw_number = atoi(*av); av++; ac--;
}
+ /* ### */
/* Action */
if (ac == 0)
--
Daniel Ortmann 507.288.7732 (h) ortmann@isl.net
2414 30 av NW, #D 507.253.6795 (w) ortmann@vnet.ibm.com
Rochester, MN 55901 "PERL: The Swiss Army Chainsaw"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709151623.LAA01132>
