summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-11-05 11:30:57 +0100
committerFlorian Westphal <fw@strlen.de>2018-11-05 13:16:41 +0100
commit9b127b7154029af612c4ffe6c08089973e9b8310 (patch)
treec34f2595b9465107d8538603ac45f9a2dcbcd7db
parentc59ba1b19b20c97e006fae7163ebb211b6f9098b (diff)
extensions: libebt_ip6: fix ip6-dport negation
Fixes: 5c8ce9c6aede0 ("ebtables-compat: add 'ip6' match extension") Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r--extensions/libebt_ip6.c2
-rw-r--r--extensions/libebt_ip6.t1
2 files changed, 2 insertions, 1 deletions
diff --git a/extensions/libebt_ip6.c b/extensions/libebt_ip6.c
index ab1413ba..b8a5a5d8 100644
--- a/extensions/libebt_ip6.c
+++ b/extensions/libebt_ip6.c
@@ -353,7 +353,7 @@ brip6_parse(int c, char **argv, int invert, unsigned int *flags,
break;
case IP_DPORT:
if (invert)
- info->invflags |= EBT_IP6_DEST;
+ info->invflags |= EBT_IP6_DPORT;
parse_port_range(NULL, optarg, info->dport);
info->bitmask |= EBT_IP6_DPORT;
break;
diff --git a/extensions/libebt_ip6.t b/extensions/libebt_ip6.t
index 98634800..9d4effdc 100644
--- a/extensions/libebt_ip6.t
+++ b/extensions/libebt_ip6.t
@@ -4,6 +4,7 @@
-p IPv6 --ip6-dst f00:ba::;=;OK
-p IPv6 --ip6-tclass 0xFF;=;OK
-p IPv6 --ip6-proto tcp --ip6-dport 22;=;OK
+-p IPv6 --ip6-proto tcp --ip6-dport ! 22;=;OK
-p IPv6 --ip6-proto udp --ip6-sport 1024:65535;=;OK
-p IPv6 --ip6-proto 253;=;OK
-p IPv6 --ip6-proto ipv6-icmp --ip6-icmp-type echo-request -j CONTINUE;=;OK