From owner-freebsd-bugs Wed May 23 2: 0:13 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2437337B43C for ; Wed, 23 May 2001 02:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4N901d48286; Wed, 23 May 2001 02:00:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4B10537B424 for ; Wed, 23 May 2001 01:58:24 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4N8wOQ48107; Wed, 23 May 2001 01:58:24 -0700 (PDT) (envelope-from nobody) Message-Id: <200105230858.f4N8wOQ48107@freefall.freebsd.org> Date: Wed, 23 May 2001 01:58:24 -0700 (PDT) From: hino@ccm.cl.nec.co.jp To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/27567: pci/if_ti.c has a problem regarding to VLAN Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 27567 >Category: kern >Synopsis: pci/if_ti.c has a problem regarding to VLAN >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 23 02:00:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Koji HINO >Release: FreeBSD 4.3-RELEASE >Organization: NEC >Environment: FreeBSD dove.ccm.cl.nec.co.jp 4.3-RELEASE FreeBSD 4.3-RELEASE #4: Wed May 23 11:54:58 JST 2001 hino@dove.ccm.cl.nec.co.jp:/usr/src/sys/compile/DOVE i386 >Description: On VLANs configured on ti0 (Netgear GA620), specific packets are lost to receive. In my case, Cabletron/Enterasys SSR8000 L3 Switch's ARP request and ARP reply to the FreeBSD box can not be received always, as long as tcpdump said. I checked if_ti.c and if_vlan.c, inserting debug messages, and found that, when receiving these problematic packets, VLAN tag is > 4095. As IEEE 802.1Q said, VLAN tag field is 12bit wide, so this is not good. Lower 12 bit of the VLAN tag is correct, so I patched to mask. Works great! I don't know why upper 4 bits of the VLAN tag are set, because I can't find source code of Tigon firmware, but suppose that priority field of 802.1Q VLAN packet may cause this problem. >How-To-Repeat: Said above. >Fix: Patch bellow will fix the problem. I don't know if sending side need masking or not. --- pci/if_ti.c.dist Thu Aug 24 09:07:58 2000 +++ pci/if_ti.c Wed May 23 11:54:47 2001 @@ -1846,7 +1846,7 @@ #if NVLAN > 0 if (cur_rx->ti_flags & TI_BDFLAG_VLAN_TAG) { have_tag = 1; - vlan_tag = cur_rx->ti_vlan_tag; + vlan_tag = cur_rx->ti_vlan_tag & 0xfff; } #endif @@ -2106,7 +2106,7 @@ #if NVLAN > 0 if (ifv != NULL) { f->ti_flags |= TI_BDFLAG_VLAN_TAG; - f->ti_vlan_tag = ifv->ifv_tag; + f->ti_vlan_tag = ifv->ifv_tag & 0xfff; } else { f->ti_vlan_tag = 0; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message