[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VLAN v.s. NIC with VLAN hardware support bug.
Hiten Pandya wrote:
On Sat, Dec 21, 2002 at 02:42:30AM +0100, Dan Lukes wrote the words in
effect of:
Dan, I believe you submitted a PR about this [1], what does patch try to
solve, regarding VLAN hardware support?
[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/46405
Hi.
May be, I'm doesn't understand fully what you are asked for - my
english isn't as good as should be.
The problem:
NIC with hardware VLAN support pass whole TAG to vlan_input(_tag).
The TAG has the following structure:
TAG & 0x8000 -> CFI
(TAG & 0x7000)>>13 -> priority
TAG & 0x0FFF -> VLAN ID
The vlan_input(_tag) doesn't extract the VLAN ID from tag, it tried
match the whole tag to configured VLAN's. It work - unless CFI or an
priority bit has nonzero value.
An example:
you have configured VLAN 256 on your FreeBSD.
The arrived packed has TAG 0x0100 (=256).
For this packet it works, as TAG matched configured VLAN.
Lets another packet has TAG 0x4100 (=16640).
It's dropped because there are no configured vlan with ID 16640 - but
should not be dropped, as it IS packed for VLAN 256 with priority 4.
In short - vlan_input(_tag) doesn't extract the correct bits from TAG,
so it drop packets that shouldn't be dropped. It's the bug fixed by my
patches. I tested it on 4.7. The patch for CURRENT isn't tested, but
it's simple to analyse that there are the same problem.
It's the sufficient answer to your question ?
Please note (it's mentioned in my PR also), the vlan code doesn't
correctly handle the VLAN ID of "zero" which has special meaning . My
patches doesn't solve it.
Dan
--
Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206
root of FIONet, KolejNET, webmaster of www.freebsd.cz
AKA: dan@xxxxxxxxx, dan@xxxxxxxxxx, dan@xxxxxxxxxxxxxxxxx
To Unsubscribe: send mail to majordomo@xxxxxxxxxxx
with "unsubscribe freebsd-stable" in the body of the message