From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 20 17:40:14 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9022A16A4CE for ; Wed, 20 Oct 2004 17:40:14 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71EC343D2D for ; Wed, 20 Oct 2004 17:40:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i9KHeE3p087325 for ; Wed, 20 Oct 2004 17:40:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9KHeERx087324; Wed, 20 Oct 2004 17:40:14 GMT (envelope-from gnats) Resent-Date: Wed, 20 Oct 2004 17:40:14 GMT Resent-Message-Id: <200410201740.i9KHeERx087324@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Lenar D. Tukhvatullin" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EEEA16A4CE for ; Wed, 20 Oct 2004 17:34:27 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33D3043D2D for ; Wed, 20 Oct 2004 17:34:27 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9KHYQDr012044 for ; Wed, 20 Oct 2004 17:34:26 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i9KHYQ1W012043; Wed, 20 Oct 2004 17:34:26 GMT (envelope-from nobody) Message-Id: <200410201734.i9KHYQ1W012043@www.freebsd.org> Date: Wed, 20 Oct 2004 17:34:26 GMT From: "Lenar D. Tukhvatullin" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/72933: promisc mode on vlan interface does not work correctly X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2004 17:40:14 -0000 >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: