]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[vlan] Treat VLAN 0 as valid
authorMichael Brown <mcb30@ipxe.org>
Sat, 27 Nov 2010 15:23:46 +0000 (15:23 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sat, 27 Nov 2010 16:04:57 +0000 (16:04 +0000)
VLAN headers are allowed to contain a VLAN tag of zero, indicating
that the header specifies only a priority and that the packet does not
belong to any VLAN.  The easiest way to handle this is to treat VLAN 0
as being a normal VLAN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/vlan.h

index b4d06b87c0c8c6579642001bc0565ac01022c0f9..c9a9821a25708b008c25cb289ae1fb2a37c08621 100644 (file)
@@ -49,7 +49,7 @@ struct vlan_header {
  * @v tag              VLAN tag
  * @ret is_valid       VLAN tag is valid
  */
-#define VLAN_TAG_IS_VALID( tag ) ( ( (tag) >= 1 ) && ( (tag) < 0xfff ) )
+#define VLAN_TAG_IS_VALID( tag ) ( (tag) < 0xfff )
 
 /**
  * Check VLAN priority is valid