From owner-freebsd-current Mon Sep 15 09:29:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA07383 for current-outgoing; Mon, 15 Sep 1997 09:29:09 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA07378 for ; Mon, 15 Sep 1997 09:29:07 -0700 (PDT) Received: from watcher.isl.net (ppp-79.isl.net [199.3.25.128]) by freefall.freebsd.org (8.8.6/8.8.5) with ESMTP id JAA11356 for ; Mon, 15 Sep 1997 09:25:35 -0700 (PDT) Received: (from ortmann@localhost) by watcher.isl.net (8.8.7/8.8.5) id LAA01132 for current@freebsd.com; Mon, 15 Sep 1997 11:23:48 -0500 (CDT) From: Daniel Ortmann Message-Id: <199709151623.LAA01132@watcher.isl.net> Subject: ipfw outputs 0's with default numbering To: current@freebsd.com Date: Mon, 15 Sep 1997 11:23:46 -0500 (CDT) X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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"