em0, VLAN and bpf(?) trouble w/RELENG_5
Mike Tancsa
mike at sentex.net
Tue Nov 9 11:14:21 PST 2004
At 02:13 PM 08/11/2004, Lenar D. Tukhvatullin wrote:
>I have similar problem (but with "bge" interface).
>See PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=72933
>Can you recompile and test kernel with my patch?
Hi,
I tried
--- if_ethersubr.c.orig Tue Nov 9 13:47:11 2004
+++ if_ethersubr.c Tue Nov 9 13:47:31 2004
@@ -647,7 +647,7 @@
#endif
if (!(BDG_ACTIVE(ifp)) &&
- !(ether_type == ETHERTYPE_VLAN && ifp->if_nvlans > 0)) {
+ !((ether_type == ETHERTYPE_VLAN || m_tag_locate(m, MTAG_VLAN,
MTAG_VLAN_TAG, NULL) != NULL) && ifp->if_nvlans > 0)) {
/*
* Discard packet if upper layers shouldn't see it because it
* was unicast to a different Ethernet address. If the driver
But no luck.
On the RELENG_5 machine, as soon as I do
# tcpdump -en -i vlan0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vlan0, link-type EN10MB (Ethernet), capture size 96 bytes
13:57:00.234459 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, 802.3, length 64:
LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, sap aa ui/C len=39
13:57:00.834971 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype IPv4
(0x0800), length 98: IP 10.2.2.1 > 10.2.2.2: icmp 64: echo request seq 19968
13:57:00.834994 00:01:80:54:b8:df > 00:01:80:54:23:5a, ethertype IPv4
(0x0800), length 98: IP 10.2.2.2 > 10.2.2.1: icmp 64: echo reply seq 19968
13:57:01.844991 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype IPv4
(0x0800), length 98: IP 10.2.2.1 > 10.2.2.2: icmp 64: echo request seq 20224
The ping never makes it back to the source. As soon as I stop the tcpdump,
traffic passes once again.
Afterwards, if I do it just on em0 and ping the vlan IP on vlan0, it again
freezes up, despite tcpdump implying that its working.
# tcpdump -i em0 -ne
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em0, link-type EN10MB (Ethernet), capture size 96 bytes
13:58:56.986762 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype 802.1Q
(0x8100), length 102: vlan 2, p 0, ethertype IPv4, IP 10.2.2.1 > 10.2.2.2:
icmp 64: echo request seq 49408
13:58:56.986790 00:01:80:54:b8:df > 00:01:80:54:23:5a, ethertype IPv4
(0x0800), length 98: IP 10.2.2.2 > 10.2.2.1: icmp 64: echo reply seq 49408
13:58:57.996780 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype 802.1Q
(0x8100), length 102: vlan 2, p 0, ethertype IPv4, IP 10.2.2.1 > 10.2.2.2:
icmp 64: echo request seq 49664
13:58:57.996803 00:01:80:54:b8:df > 00:01:80:54:23:5a, ethertype IPv4
(0x0800), length 98: IP 10.2.2.2 > 10.2.2.1: icmp 64: echo reply seq 49664
13:58:58.110834 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, ethertype 802.1Q
(0x8100), length 68: vlan 3, p 7, LLC, dsap SNAP (0xaa), ssap SNAP (0xaa),
cmd 0x03, sap aa ui/C len=39
0x0000: 0100 0ccc cccd 000b be69 149a 8100 e003 .........i......
0x0010: 0032 aaaa 0300 000c 010b 0000 0000 0080 .2..............
0x0020: 0300 0bbe 6914 8000 0000 0080 0300 0bbe ....i...........
0x0030: 6914 8080 1a00 i.....
13:58:58.112208 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, ethertype 802.1Q
(0x8100), length 68: vlan 4, p 7, LLC, dsap SNAP (0xaa), ssap SNAP (0xaa),
cmd 0x03, sap aa ui/C len=39
0x0000: 0100 0ccc cccd 000b be69 149a 8100 e004 .........i......
0x0010: 0032 aaaa 0300 000c 010b 0000 0000 0080 .2..............
0x0020: 0400 0bbe 6914 8000 0000 0080 0400 0bbe ....i...........
0x0030: 6914 8080 1a00 i.....
13:58:58.124076 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, ethertype 802.1Q
(0x8100), length 68: vlan 109, p 7, LLC, dsap SNAP (0xaa), ssap SNAP
(0xaa), cmd 0x03, sap aa ui/C len=39
0x0000: 0100 0ccc cccd 000b be69 149a 8100 e06d .........i.....m
0x0010: 0032 aaaa 0300 000c 010b 0000 0000 0080 .2..............
0x0020: 6d00 0bbe 6914 8000 0000 0080 6d00 0bbe m...i.......m...
0x0030: 6914 8080 1a00 i.....
13:58:58.234760 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, ethertype 802.1Q
(0x8100), length 68: vlan 2, p 7, LLC, dsap SNAP (0xaa), ssap SNAP (0xaa),
cmd 0x03, sap aa ui/C len=39
0x0000: 0100 0ccc cccd 000b be69 149a 8100 e002 .........i......
0x0010: 0032 aaaa 0300 000c 010b 0000 0000 0080 .2..............
0x0020: 0200 0bbe 6914 8000 0000 0080 0200 0bbe ....i...........
0x0030: 6914 8080 1a00 i.....
13:58:58.250875 00:0b:be:69:14:9a > 01:80:c2:00:00:00, 802.3, length 60:
LLC, dsap STP (0x42), ssap STP (0x42), cmd 0x03, 802.1d config
8001.00:0b:be:69:14:80.801a root 8001.00:0b:be:69:14:80 pathcost 0 age 0
max 20 hello 2 fdelay 15
13:58:58.251875 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, 802.3, length 64:
LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, sap aa ui/C len=39
13:58:58.759447 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cc, 802.3, length 388:
LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, CDPv2, ttl: 180s,
Device-ID 'Switch'[|cdp]
13:58:58.762568 00:0b:be:69:14:9a > 00:0b:be:69:14:9a, ethertype Loopback
(0x9000), length 60:
0x0000: 0000 0100 0000 0000 0000 0000 0000 0000 ................
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 0000 ..............
13:58:59.006797 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype 802.1Q
(0x8100), length 102: vlan 2, p 0, ethertype IPv4, IP 10.2.2.1 > 10.2.2.2:
icmp 64: echo request seq 49920
13:58:59.006817 00:01:80:54:b8:df > 00:01:80:54:23:5a, ethertype IPv4
(0x0800), length 98: IP 10.2.2.2 > 10.2.2.1: icmp 64: echo reply seq 49920
^C
14 packets captured
14 packets received by filter
0 packets dropped by kernel
#
If I reboot the system, and just tcpdump em0, everything works as
expected. I can start and stop the dump with no problem.
I can then ifconfig vlan0 create, and still start and stop tcpdump -i em0
with no problem.
But if I then send some data across vlan0 from the other machine, doing a
tcpdump -i em0 stops all traffic from coming back. ie.. em0 and vlan0 get
the data, but em0 and vlan0 no longer can send data.
---Mike
More information about the freebsd-current
mailing list