Browse Source

[vlan] Treat VLAN 0 as valid

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>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
c5c0a27b68
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/include/ipxe/vlan.h

+ 1
- 1
src/include/ipxe/vlan.h View File

49
  * @v tag		VLAN tag
49
  * @v tag		VLAN tag
50
  * @ret is_valid	VLAN tag is valid
50
  * @ret is_valid	VLAN tag is valid
51
  */
51
  */
52
-#define VLAN_TAG_IS_VALID( tag ) ( ( (tag) >= 1 ) && ( (tag) < 0xfff ) )
52
+#define VLAN_TAG_IS_VALID( tag ) ( (tag) < 0xfff )
53
 
53
 
54
 /**
54
 /**
55
  * Check VLAN priority is valid
55
  * Check VLAN priority is valid

Loading…
Cancel
Save