[PATCH xtables] extensions: libebt_ip6: fix ip6-dport negation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes: 5c8ce9c6aede0 ("ebtables-compat: add 'ip6' match extension")
Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
---
 extensions/libebt_ip6.c | 2 +-
 extensions/libebt_ip6.t | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/extensions/libebt_ip6.c b/extensions/libebt_ip6.c
index ab1413ba9189..b8a5a5d8c3a9 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 986348008f12..9d4effdc20e5 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
-- 
2.18.1




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux