From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 20 06:10:06 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 D808116A41F for ; Tue, 20 Sep 2005 06:10:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55F4A43D4C for ; Tue, 20 Sep 2005 06:10:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8K6A6ns079738 for ; Tue, 20 Sep 2005 06:10:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8K6A6SI079737; Tue, 20 Sep 2005 06:10:06 GMT (envelope-from gnats) Resent-Date: Tue, 20 Sep 2005 06:10:06 GMT Resent-Message-Id: <200509200610.j8K6A6SI079737@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, Peter Jeremy Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8AB9916A41F for ; Tue, 20 Sep 2005 06:02:26 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5780943D55 for ; Tue, 20 Sep 2005 06:02:26 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j8K62Ooj082387 for ; Tue, 20 Sep 2005 06:02:24 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j8K62NrY082386; Tue, 20 Sep 2005 06:02:23 GMT (envelope-from nobody) Message-Id: <200509200602.j8K62NrY082386@www.freebsd.org> Date: Tue, 20 Sep 2005 06:02:23 GMT From: Peter Jeremy To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/86361: bridge(4) does not work with VLAN trunks X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2005 06:10:07 -0000 >Number: 86361 >Category: kern >Synopsis: bridge(4) does not work with VLAN trunks >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 20 06:10:05 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: 5.3-RELEASE-p5 >Organization: Alcatel Australia Limited >Environment: FreeBSD aalp02.alcatel.com.au 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #4: Fri Feb 25 10:13:13 EST 2005 root@aalp02.alcatel.com.au:/var/obj/usr/src/sys/wansim i386 The code has not changed in 7-CURRENT so the problem is still presumably present. >Description: bridge(4) includes code to detect network topology loops by monitoring the MAC addresses that it sees on each bridged interface and isolating the interface if the same source MAC address is seen on more than one interface more than 10 times in 10 seconds. In the case of a VLAN trunk, this check is incorrect as the MAC addresses only need to be unique within each VLAN. With protocols like DECnet as well as the Cassini (ce) adaptor on Solaris, it is normal for the same MAC address to appear in multiple VLANs, potentially on different switches. The behaviour of bridge(4) causes the interfaces to be muted when this occurs. like DECnet simple >How-To-Repeat: Configure a host with the same MAC address on two or more NICs. Connect the NICs to different VLANs configured on different switches. Configure trunks on each switch containing all VLANs and connect them to separate NICs on the FreeBSD box. On the FreeBSD box, enable bridging between the two NICs (the NICs need to be up but do not need to be configured with VLAN pseudo-interfaces). Generate ethernet broadcast traffic (eg ARP requests) from all the test interfaces and verify that the FreeBSD box reports loops. >Fix: The simplest solution would seem to be to include provision for a VLAN tag in bdg_hash_table. This would need to be extracted from the received packet and included in HASH_FN. >Release-Note: >Audit-Trail: >Unformatted: