summaryrefslogtreecommitdiffstats
path: root/extensions/ebt_vlan.c
diff options
context:
space:
mode:
authorfnm3 <fnm3>2002-11-09 13:27:31 +0000
committerfnm3 <fnm3>2002-11-09 13:27:31 +0000
commitcd33827064223600ae98e59fef51f6668d83667f (patch)
treeaaac2295837f8bfcb9a383753a54d65ac626835c /extensions/ebt_vlan.c
parentcc44005b3658efd276071e96755c873ae3b86002 (diff)
Add check for vlan-encap=802.1q
Diffstat (limited to 'extensions/ebt_vlan.c')
-rw-r--r--extensions/ebt_vlan.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/extensions/ebt_vlan.c b/extensions/ebt_vlan.c
index 382961f..297b61b 100644
--- a/extensions/ebt_vlan.c
+++ b/extensions/ebt_vlan.c
@@ -228,6 +228,16 @@ final_check (const struct ebt_u_entry *entry,
print_error
("For use 802.1Q extension the protocol must be specified as 802_1Q");
/*
+ * Check if specified vlan-encap=0x8100 (802.1Q Frame)
+ * when vlan-encap specified.
+ */
+ if (GET_BITMASK (EBT_VLAN_ENCAP)) {
+ if (vlaninfo->encap==htons(0x8100))
+ print_error
+ ("Encapsulated frame type can not be 802.1Q (0x8100)");
+ }
+
+ /*
* Check if specified vlan-id=0 (priority-tagged frame condition)
* when vlan-prio was specified.
*/