summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/ebt_arp.c3
-rw-r--r--extensions/ebt_ip.c3
-rw-r--r--extensions/ebt_vlan.c4
3 files changed, 4 insertions, 6 deletions
diff --git a/extensions/ebt_arp.c b/extensions/ebt_arp.c
index f83146a..da3d9d6 100644
--- a/extensions/ebt_arp.c
+++ b/extensions/ebt_arp.c
@@ -176,8 +176,7 @@ static void final_check(const struct ebt_u_entry *entry,
const struct ebt_entry_match *match, const char *name,
unsigned int hookmask, unsigned int time)
{
- if (entry->bitmask & EBT_NOPROTO || entry->bitmask & EBT_802_3 ||
- (entry->ethproto != ETH_P_ARP && entry->ethproto != ETH_P_RARP) ||
+ if ((entry->ethproto != ETH_P_ARP && entry->ethproto != ETH_P_RARP) ||
entry->invflags & EBT_IPROTO)
print_error("For (R)ARP filtering the protocol must be "
"specified as ARP or RARP");
diff --git a/extensions/ebt_ip.c b/extensions/ebt_ip.c
index 94daef3..7080505 100644
--- a/extensions/ebt_ip.c
+++ b/extensions/ebt_ip.c
@@ -219,8 +219,7 @@ static void final_check(const struct ebt_u_entry *entry,
const struct ebt_entry_match *match, const char *name,
unsigned int hookmask, unsigned int time)
{
- if (entry->bitmask & EBT_NOPROTO || entry->bitmask & EBT_802_3 ||
- entry->ethproto != ETH_P_IP || entry->invflags & EBT_IPROTO)
+ if (entry->ethproto != ETH_P_IP || entry->invflags & EBT_IPROTO)
print_error("For IP filtering the protocol must be "
"specified as IPv4");
}
diff --git a/extensions/ebt_vlan.c b/extensions/ebt_vlan.c
index 1bab20c..382961f 100644
--- a/extensions/ebt_vlan.c
+++ b/extensions/ebt_vlan.c
@@ -221,9 +221,9 @@ final_check (const struct ebt_u_entry *entry,
struct ebt_vlan_info *vlaninfo =
(struct ebt_vlan_info *) match->data;
/*
- * Is any proto param specified there? Or specified proto isn't 802.1Q?
+ * Specified proto isn't 802.1Q?
*/
- if (entry->bitmask & EBT_NOPROTO || entry->ethproto != ETH_P_8021Q ||
+ if (entry->ethproto != ETH_P_8021Q ||
entry->invflags & EBT_IPROTO)
print_error
("For use 802.1Q extension the protocol must be specified as 802_1Q");