summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/linux2.5/net/bridge/netfilter/ebt_ip.c4
-rw-r--r--userspace/ebtables2/extensions/ebt_ip.c14
2 files changed, 9 insertions, 9 deletions
diff --git a/kernel/linux2.5/net/bridge/netfilter/ebt_ip.c b/kernel/linux2.5/net/bridge/netfilter/ebt_ip.c
index ef42962..6a2154c 100644
--- a/kernel/linux2.5/net/bridge/netfilter/ebt_ip.c
+++ b/kernel/linux2.5/net/bridge/netfilter/ebt_ip.c
@@ -2,7 +2,7 @@
* ebt_ip
*
* Authors:
- * Bart De Schuymer <bart.de.schuymer@pandora.be>
+ * Bart De Schuymer <bdschuym@pandora.be>
*
* April, 2002
*
@@ -86,7 +86,7 @@ static int ebt_ip_check(const char *tablename, unsigned int hookmask,
if (info->bitmask & ~EBT_IP_MASK || info->invflags & ~EBT_IP_MASK)
return -EINVAL;
if (info->bitmask & (EBT_IP_DPORT | EBT_IP_SPORT)) {
- if (!info->bitmask & EBT_IPROTO)
+ if (!(info->bitmask & EBT_IPROTO))
return -EINVAL;
if (info->protocol != IPPROTO_TCP &&
info->protocol != IPPROTO_UDP)
diff --git a/userspace/ebtables2/extensions/ebt_ip.c b/userspace/ebtables2/extensions/ebt_ip.c
index 36cb3c9..76da2b7 100644
--- a/userspace/ebtables2/extensions/ebt_ip.c
+++ b/userspace/ebtables2/extensions/ebt_ip.c
@@ -344,13 +344,13 @@ static void final_check(const struct ebt_u_entry *entry,
print_error("For IP filtering the protocol must be "
"specified as IPv4");
- if (ipinfo->bitmask & (EBT_IP_SPORT|EBT_IP_DPORT) &&
- (!ipinfo->bitmask & EBT_IP_PROTO ||
- ipinfo->invflags & EBT_IP_PROTO ||
- (ipinfo->protocol!=IPPROTO_TCP &&
- ipinfo->protocol!=IPPROTO_UDP)))
- print_error("For port filtering the IP protocol must be "
- "either 6 (tcp) or 17 (udp)");
+ if (ipinfo->bitmask & (EBT_IP_SPORT|EBT_IP_DPORT) &&
+ (!(ipinfo->bitmask & EBT_IP_PROTO) ||
+ ipinfo->invflags & EBT_IP_PROTO ||
+ (ipinfo->protocol!=IPPROTO_TCP &&
+ ipinfo->protocol!=IPPROTO_UDP)))
+ print_error("For port filtering the IP protocol must be "
+ "either 6 (tcp) or 17 (udp)");
}
static void print(const struct ebt_u_entry *entry,