Date: Wed, 23 May 2001 01:58:24 -0700 (PDT) From: hino@ccm.cl.nec.co.jp To: freebsd-gnats-submit@FreeBSD.org Subject: kern/27567: pci/if_ti.c has a problem regarding to VLAN Message-ID: <200105230858.f4N8wOQ48107@freefall.freebsd.org>
index | next in thread | raw e-mail
>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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105230858.f4N8wOQ48107>
