Date: Mon, 4 Aug 1997 09:00:02 -0700 (PDT) From: Daniel Holmes <danielh@dakcs.com> To: freebsd-bugs Subject: Re: bin/4209: ipfw does not work with multiple digit interface numbers Message-ID: <199708041600.JAA07543@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/4209; it has been noted by GNATS. From: Daniel Holmes <danielh@dakcs.com> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 207.108.157.97 netmask 0xfffffff0 broadcast 207.108.157.111 ether 00:c0:26:38:ab:4a lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500 eth0: flags=41<UP,RUNNING> mtu 1500 inet 192.168.1.3 netmask 0xffffffff lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 etha16: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> 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!" <ZAP!> I'net: DANIELH@DAKCS.COM "Hey--where'd Riker go?" Standard disclaimers apply wherever you can find a sticky spot.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708041600.JAA07543>