From owner-freebsd-bugs Mon Aug 4 09:00:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA07564 for bugs-outgoing; Mon, 4 Aug 1997 09:00:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA07543; Mon, 4 Aug 1997 09:00:02 -0700 (PDT) Date: Mon, 4 Aug 1997 09:00:02 -0700 (PDT) Message-Id: <199708041600.JAA07543@hub.freebsd.org> To: freebsd-bugs Cc: From: Daniel Holmes Subject: Re: bin/4209: ipfw does not work with multiple digit interface numbers Reply-To: Daniel Holmes Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/4209; it has been noted by GNATS. From: Daniel Holmes To: nate@mt.sri.com Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/4209: ipfw does not work with multiple digit interface numbers Date: Mon, 4 Aug 1997 15:58:51 GMT Hmm, this works in 2.1-stable: # /sbin/ipfw add 65000 deny log all from any to any via etha16 Just tried it on 2.2-RELEASE, no go. I'll check some sources and see what has changed. What's the output of: # ifconfig etha16 # ifconfig -a ed0: flags=8843 mtu 1500 inet 207.108.157.97 netmask 0xfffffff0 broadcast 207.108.157.111 ether 00:c0:26:38:ab:4a lp0: flags=8810 mtu 1500 eth0: flags=41 mtu 1500 inet 192.168.1.3 netmask 0xffffffff lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 etha16: flags=8051 mtu 1500 inet 206.80.195.22 --> 206.80.195.21 netmask 0xfffffffc I did check the source to ipfw.c over the weekend, and it looks like when it sets up the unit name and number, it sets the last character from the string to a null but it looks like it gets everything after the first digit on the unit number. At line 742 in ipfw.c: rule.fw_via_name[sizeof(rule.fw_via_name) - 1] = '\0'; changing that to rule.fw_via_name[sizeof(rule.fw_via_name)] = '\0'; at least makes the rule show up correctly in the 'ipfw list' command, but I don't know if it actually does any good, or not. I did notice that it doesn't accept 3 digit unit numbers, but that is a secondary concern at the moment. uname gives: FreeBSD ns1.recoverycoll.com 2.2.2-RELEASE FreeBSD 2.2.2-RELEASE #0: Wed Jul 2 14:38:29 GMT 1997 danielh@hwroom.dakcs.com:/usr/src/sys/compile/FIREWALL i386 Any ideas? Thanks, Dan -- Daniel D Holmes, N7NKR "Mr. Worf, fire at will!" I'net: DANIELH@DAKCS.COM "Hey--where'd Riker go?" Standard disclaimers apply wherever you can find a sticky spot.