Thread (11 messages) flat view 11 messages, 6 authors, 2011-02-21

Re: Off-by-one error in net/8021q/vlan.c

From: Michał Mirosław <hidden>
Date: 2011-02-16 18:41:36

2011/2/16 Eric Dumazet [off-list ref]:
Le mercredi 16 février 2011 à 08:28 -0800, Phil Karn a écrit :
quoted
On 2/16/11 8:10 AM, richard -rw- weinberger wrote:
quoted
On Wed, Feb 16, 2011 at 4:58 PM, Phil Karn [off-list ref] wrote:
quoted
On 2/16/11 4:51 AM, richard -rw- weinberger wrote:
quoted
On Wed, Feb 16, 2011 at 11:58 AM, Phil Karn [off-list ref] wrote:
quoted
The range check on vlan_id in register_vlan_device is off by one, and it
prevents the creation of a vlan interface for vlan ID 4095. (OSX allows
this, I checked.)
Then OSX should fix their code. 4095 is reserved.
If it's reserved, then it's up to the user to reserve it.
No.
See:
http://standards.ieee.org/getieee802/download/802.1Q-2005.pdf
Well, then I guess we all know better than the user. That's the Windows
Way...no, wait, I thought this is Linux.

The fact is that I did encounter a misconfigured switch using vlan 4095,
and because of this off-by-one error I was unable to talk to it and fix it.

I was hoping I wouldn't have to patch every new kernel I install.
You can use an OSX gateway ;)

If we allow ID 4095, then some users will complain we violate rules.

Really you cannot push this patch in official kernel only to ease your
life ;)
The idea is that you don't have to use ID 4095 and if you don't -
nothing's broken by just allowing it. The same goes with ID 0 - it's
defined to be 802.1p packet, but people do use it as normal VLAN
(especially with hardware that can cope with only small number of
VLANs at once).

Allowing it but with a big fat warning in logs is even better: "You
want your network broken? Sure, can do, but you have been warned."

Best Regards,
Michał Mirosław
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help