]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
tests: iptables-test: Cover for obligatory -j CONTINUE in ebtables
authorPhil Sutter <phil@nwl.cc>
Wed, 5 Oct 2022 17:51:08 +0000 (19:51 +0200)
committerPhil Sutter <phil@nwl.cc>
Wed, 26 Oct 2022 18:11:55 +0000 (20:11 +0200)
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>
iptables-test.py

index d9b3ee4e29464893b73abcbe88dc41712af2a7d7..dc031c2b60450c451aa293007dd8036382804a3a 100755 (executable)
@@ -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]