From 9ca32c40ed4f0648893989c1e5d03e9fecc501ae Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 9 Aug 2018 18:06:56 +0200 Subject: xtables: Don't pass full invflags to add_compat() The function expects a boolean, not a bitfield. This bug caused inversion in another match to carry over to protocol match by accident. The supplied testcase contains rules which then fail because they contain matches requiring that protocol. Fixes: 4ef77b6d1b52e ("xtables: fix missing protocol and invflags") Fixes: 4143a08819a07 ("ebtables-compat: add nft rule compat information to bridge rules") Signed-off-by: Phil Sutter --- iptables/tests/shell/testcases/nft-only/0002invflags_0 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 iptables/tests/shell/testcases/nft-only/0002invflags_0 (limited to 'iptables/tests') diff --git a/iptables/tests/shell/testcases/nft-only/0002invflags_0 b/iptables/tests/shell/testcases/nft-only/0002invflags_0 new file mode 100755 index 00000000..406b6081 --- /dev/null +++ b/iptables/tests/shell/testcases/nft-only/0002invflags_0 @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +[[ $XT_MULTI == */xtables-nft-multi ]] || { echo "skip $XT_MULTI"; exit 0; } + +$XT_MULTI iptables -A INPUT -p tcp --dport 53 ! -s 192.168.0.1 -j ACCEPT +$XT_MULTI ip6tables -A INPUT -p tcp --dport 53 ! -s feed:babe::1 -j ACCEPT +$XT_MULTI ebtables -A INPUT -p IPv4 --ip-src 10.0.0.1 ! -i lo -j ACCEPT + -- cgit v1.2.3