From cd33827064223600ae98e59fef51f6668d83667f Mon Sep 17 00:00:00 2001 From: fnm3 Date: Sat, 9 Nov 2002 13:27:31 +0000 Subject: Add check for vlan-encap=802.1q --- extensions/ebt_vlan.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'extensions') 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 @@ -227,6 +227,16 @@ final_check (const struct ebt_u_entry *entry, entry->invflags & EBT_IPROTO) 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. -- cgit v1.2.3