summaryrefslogtreecommitdiffstats
path: root/iptables-test.py
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-10-05 19:51:08 +0200
committerPhil Sutter <phil@nwl.cc>2022-10-26 20:11:55 +0200
commite8687835e1f9a8b4cf635239f398ef93673ebd76 (patch)
treee490e8311b89d84c96d5c25e3b1fa1baa1a7b16d /iptables-test.py
parent0e80cfea3762b6680051e2b23ed69a493c762aa4 (diff)
tests: iptables-test: Cover for obligatory -j CONTINUE in ebtables
Unlike iptables, ebtables includes the default rule target in output. Instead of adding it to every rule in ebtables tests, add special casing to the testscript checking if the expected rule output contains a target already and adding the default one if not. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables-test.py')
-rwxr-xr-xiptables-test.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/iptables-test.py b/iptables-test.py
index d9b3ee4e..dc031c2b 100755
--- a/iptables-test.py
+++ b/iptables-test.py
@@ -287,6 +287,9 @@ def run_test_file_fast(iptables, filename, netns):
else:
rule_save = chain + " " + item[1]
+ if iptables == EBTABLES and rule_save.find('-j') < 0:
+ rule_save += " -j CONTINUE"
+
res = item[2].rstrip()
if res != "OK":
rule = chain + " -t " + table + " " + item[0]