| Summary: | pci/if_ti.c has a problem regarding to VLAN | ||
|---|---|---|---|
| Product: | Base System | Reporter: | hino <hino> |
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.3-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Committed, thanks! |
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. Fix: Patch bellow will fix the problem. I don't know if sending side need masking or not. @@ -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; }--xRwBkwnwHS2V7xRROgVQMQ0IDlC47IzKMyzKAyEuZFVKOA0P Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" --- 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 How-To-Repeat: Said above.