Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Dec 2002 12:38:17 +0100
From:      Dan Lukes <dan@obluda.cz>
To:        Hiten Pandya <hiten@unixdaemons.com>
Cc:        freebsd-current@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, dcs@newsguy.com
Subject:   Re: VLAN v.s. NIC with VLAN hardware support bug.
Message-ID:  <3E05A429.7080506@obluda.cz>
In-Reply-To: <3E038A1A.6070203@obluda.cz>
References:  <3E038A1A.6070203@obluda.cz> <3E03A86C.6D15F650@newsguy.com> <3E03C706.5060508@obluda.cz> <20021221233424.GA23657@unixdaemons.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@obluda.cz, dan@freebsd.cz, dan@kolej.mff.cuni.cz


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E05A429.7080506>