Date: Wed, 20 Oct 2004 17:34:26 GMT From: "Lenar D. Tukhvatullin" <blackv@netroad.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/72933: promisc mode on vlan interface does not work correctly Message-ID: <200410201734.i9KHYQ1W012043@www.freebsd.org> Resent-Message-ID: <200410201740.i9KHeERx087324@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72933 >Category: kern >Synopsis: promisc mode on vlan interface does not work correctly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 20 17:40:14 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Lenar D. Tukhvatullin >Release: 5.3-STABLE >Organization: Ulyanovsk State Technical University >Environment: FreeBSD xxx.com 5.3-STABLE FreeBSD 5.3-STABLE #2: Wed Oct 20 12:22:08 MSD 2004 lenar@xxx.com:/usr/obj/usr/src/sys/GENERIC i386 FreeBSD 5.3-STABLE, RELENG_5 cvsup'ed at Oct 20 2004 >Description: Promiscuous mode on vlan interface does not work if parent interface supports VLAN_HWTAGGING. Probably bug in sys/net/if_ethersubr.c:650 (packet with non-parents ethernet-address is rejected by ether_demux) >How-To-Repeat: (bge0 supports VLAN_HW_TAGGING) # ifconfig vlan0 create # infconfig vlan0 vlan 1 vlandev bge0 # ifconfig bge0 up # ifconfig vlan0 up configure bridging beetwen vlan0 and another interface (bge1): # ifconfig bge1 172.16.0.1 netmask 255.255.255.0 # kldload bridge # sysctl.net.link.ether.bridge.config="vlan0 bge1" # sysctl.net.link.ether.bridge.enable=1 log messages: .. kernel: bge1: promiscuous mode enabled .. kernel: bge0: promiscuous mode enabled .. kernel: vlan0: promiscuous mode enabled pinging host (172.16.0.2 located on bge0 side in vlan 1) # ping 172.16.0.2 .. Host is down Host is down ----- tcpdump's in another console: # tcpdump -e -i bge0 21:20:24.753738 00:08:02:91:d5:61 > Broadcast, ethertype ARP (0x0806), length 42: arp who-has 172.16 .0.2 tell 172.16.0.1 21:20:24.755528 00:11:20:11:34:c0 > 00:08:02:91:d5:61, ethertype ARP (0x0806), length 60: arp reply 172.16.0.2 is-at 00:11:20:11:34:c0 21:20:25.758096 00:08:02:91:d5:61 > Broadcast, ethertype ARP (0x0806), length 42: arp who-has 172.16 .0.2 tell 172.16.0.1 21:20:25.759672 00:11:20:11:34:c0 > 00:08:02:91:d5:61, ethertype ARP (0x0806), length 60: arp reply 172.16.0.2 is-at 00:11:20:11:34:c0 ... # tcpdump -e -i vlan0 21:22:35.649629 00:08:02:91:d5:61 > Broadcast, ethertype ARP (0x0806), length 42: arp who-has 172.16 .0.2 tell 172.16.0.1 21:22:36.650105 00:08:02:91:d5:61 > Broadcast, ethertype ARP (0x0806), length 42: arp who-has 172.16 .0.2 tell 172.16.0.1 .. ----- incoming packet on bge0 is not delivered to vlan0 interface. >Fix: fix sys/net/if_ethersubr.c:650 (in function ether_demux) original: !(ether_type == ETHERTYPE_VLAN && ifp->if_nvlans > 0)) { fixed: !((ether_type == ETHERTYPE_VLAN || m_tag_locate(m, MTAG_VLAN, MTAG_VLAN_TAG, NULL) != NULL) && ifp->if_nvlans > 0)) { this is an example, may be fixed by other way... >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410201734.i9KHYQ1W012043>