Subject: forwarded broadcast packet corruption
To: None <tech-net@netbsd.org>
From: Neil Ludban <nludban@ydi.com>
List: tech-net
Date: 07/06/2004 09:11:59
Hello,

I'm seeing a byte-swapped IP length on the wire for forwarded
broadcast packets.  Same requests originating from this host are
working correctly, and forwarded unicast requests work ok.  I
also tried swapping out the hub for a different vendor's switch
and pinging in the opposite direction.  The corrupted packets
were sniffed using several different hosts and OSs, so it must be
either NetBSD, the driver, or the NICs...

The forwarding host is:

NetBSD nb.karlnet.com 1.6 NetBSD 1.6 (GENERIC) #0:
Sun Sep  8 19:43:40 UTC 2002
autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC 
i386

and packet captures (all from this host) show:

****
ex0: 
flags=8963<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,SIMPLEX,MULTICAST> 
mtu 1500
         capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
         enabled=0<>
         address: 00:04:76:e3:35:a8
         media: Ethernet autoselect (100baseTX full-duplex)
         status: active
         inet 10.0.1.50 netmask 0xffff0000 broadcast 10.0.255.255
         inet6 fe80::204:76ff:fee3:35a8%ex0 prefixlen 64 scopeid 0x1

16:14:58.965606 0:3:47:e8:ac:d5 0:4:76:e3:35:a8 0800 98:
	10.0.1.245 > 10.99.99.255: icmp: echo request (ttl 255, id 41821, len 84)
0x0000   4500 0054 a35d 0000 ff01 9df4 0a00 01f5        E..T.]..........
0x0010   0a63 63ff 0800 c758 7224 0000 4874 e440        .cc....Xr$..Ht.@
0x0020   a5ca 0100 0809 0a0b 0c0d 0e0f 1011 1213        ................
0x0030   1415 1617 1819 1a1b 1c1d 1e1f 2021 2223        .............!"#
0x0040   2425 2627 2829 2a2b 2c2d 2e2f 3031 3233        $%&'()*+,-./0123
0x0050   3435 3637                                      4567

16:14:58.965681 0:4:76:e3:35:a8 0:3:47:e8:ac:d5 0800 98:
	10.99.99.99 > 10.0.1.245: icmp: echo reply (ttl 255, id 50236, len 84)
0x0000   4500 0054 c43c 0000 ff01 7db1 0a63 6363        E..T.<....}..ccc
0x0010   0a00 01f5 0000 cf58 7224 0000 4874 e440        .......Xr$..Ht.@
0x0020   a5ca 0100 0809 0a0b 0c0d 0e0f 1011 1213        ................
0x0030   1415 1617 1819 1a1b 1c1d 1e1f 2021 2223        .............!"#
0x0040   2425 2627 2829 2a2b 2c2d 2e2f 3031 3233        $%&'()*+,-./0123
0x0050   3435 3637                                      4567

****
ex1: 
flags=8963<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,SIMPLEX,MULTICAST> 
mtu 1500
         capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
         enabled=0<>
         address: 00:01:03:e2:65:e4
         media: Ethernet autoselect (10baseT)
         status: active
         inet 10.99.99.99 netmask 0xffffff00 broadcast 10.99.99.255
         inet alias 169.254.99.99 netmask 0xffff0000 broadcast 
169.254.255.255
         inet6 fe80::201:3ff:fee2:65e4%ex1 prefixlen 64 scopeid 0x2

16:14:58.965656 0:1:3:e2:65:e4 ff:ff:ff:ff:ff:ff 0800 98:
	10.0.1.245 > 10.99.99.255: icmp: echo request (ttl 254, id 41821, len 84)
0x0000   4500 0054 a35d 0000 fe01 9ef4 0a00 01f5        E..T.]..........
0x0010   0a63 63ff 0800 c758 7224 0000 4874 e440        .cc....Xr$..Ht.@
0x0020   a5ca 0100 0809 0a0b 0c0d 0e0f 1011 1213        ................
0x0030   1415 1617 1819 1a1b 1c1d 1e1f 2021 2223        .............!"#
0x0040   2425 2627 2829 2a2b 2c2d 2e2f 3031 3233        $%&'()*+,-./0123
0x0050   3435 3637                                      4567

****
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         address: 00:e0:4c:9d:0d:b5
         media: Ethernet autoselect (10baseT)
         status: active
         inet6 fe80::2e0:4cff:fe9d:db5%vr0 prefixlen 64 scopeid 0x3

16:14:58.965785 0:1:3:e2:65:e4 ff:ff:ff:ff:ff:ff 0800 102:
	truncated-ip - 21416 bytes missing!
	10.99.99.99 > 10.0.1.245: icmp: echo reply
0x0000   4500 5400 c43c 0000 ff01 9ef4 0a63 6363        E.T..<.......ccc
0x0010   0a00 01f5 0000 cf58 7224 0000 4874 e440        .......Xr$..Ht.@
0x0020   a5ca 0100 0809 0a0b 0c0d 0e0f 1011 1213        ................
0x0030   1415 1617 1819 1a1b 1c1d 1e1f 2021 2223        .............!"#
0x0040   2425 2627 2829 2a2b 2c2d 2e2f 3031 3233        $%&'()*+,-./0123
0x0050   3435 3637 5b1f 1a55                            4567[..U


Just wondering if this is/was a known bug, or if anybody else can test
before I start working through the code.

-Neil