]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libebt_ip6: fix ip6-dport negation
authorFlorian Westphal <fw@strlen.de>
Mon, 5 Nov 2018 10:30:57 +0000 (11:30 +0100)
committerFlorian Westphal <fw@strlen.de>
Mon, 5 Nov 2018 12:16:41 +0000 (13:16 +0100)
Fixes: 5c8ce9c6aede0 ("ebtables-compat: add 'ip6' match extension")
Signed-off-by: Florian Westphal <fw@strlen.de>
extensions/libebt_ip6.c
extensions/libebt_ip6.t

index ab1413ba9189c565d6652211922829c4da371d2c..b8a5a5d8c3a923213146c15fee3da1f65e8e0d36 100644 (file)
@@ -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;
index 986348008f12f4315303ed4f0d3561c3b496a813..9d4effdc20e5a2c902bd0a6f29bbc3909090dec4 100644 (file)
@@ -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