bin/119542: netstat does not print correcty L2 routes on bridge
interfaces
Niki Denev
niki at totalterror.net
Thu Jan 10 12:40:02 PST 2008
>Number: 119542
>Category: bin
>Synopsis: netstat does not print correcty L2 routes on bridge interfaces
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 10 20:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Niki Denev
>Release: FreeBSD 7.0-BETA2
>Organization:
>Environment:
FreeBSD ndenev.office.suresupport.com 7.0-BETA2 FreeBSD 7.0-BETA2 #5: Sat Nov 3 18:13:12 EET 2007 ndenev at ndenev.office:/usr/obj/usr/src/sys/XXX i386
>Description:
When viewing the routing table with netstat, all L2 host routes accessible on a bridge interface are shown incorrectly formatted. The delimiter is '.' and not ':', and the octets are not zero prepended if they are only one char.
>How-To-Repeat:
ndenev# netstat -rnfinet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.0.1 UGS 0 3301 bridge
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.0.0/24 link#3 UC 0 0 bridge
192.168.0.1 0.e.c.aa.da.c2 UHLW 2 0 bridge 997
192.168.0.15 0.c.6e.e4.1d.fb UHLW 1 72 bridge 383
192.168.0.22 0.30.48.75.2f.ac UHLW 1 1377 bridge 1069
>Fix:
Patch your netstat with the attached patch or from : http://bg.freebsd.org/~ndenev/src/netstat-bridge_l2_route_fix.patch
And then the output should be OK :
ndenev# netstat -rnfinet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.0.1 UGS 0 4966 bridge
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.0.0/24 link#3 UC 0 0 bridge
192.168.0.1 00:0e:0c:aa:da:c2 UHLW 2 0 bridge 659
192.168.0.15 00:0c:6e:e4:1d:fb UHLW 1 100 bridge 1085
192.168.0.22 00:30:48:75:2f:ac UHLW 1 2060 bridge 731
Patch attached with submission follows:
--- usr.bin/netstat/route.c.orig 2008-01-11 04:14:54.000000000 +0000
+++ usr.bin/netstat/route.c 2008-01-11 04:15:55.000000000 +0000
@@ -660,6 +660,7 @@
case IFT_ETHER:
case IFT_L2VLAN:
+ case IFT_BRIDGE:
if (sdl->sdl_alen == ETHER_ADDR_LEN) {
cp = ether_ntoa((struct ether_addr *)
(sdl->sdl_data + sdl->sdl_nlen));
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list