]> git.ipfire.org Git - thirdparty/iptables.git/commit
tests: xlate: Use --check to verify replay
authorPhil Sutter <phil@nwl.cc>
Thu, 1 Dec 2022 00:38:26 +0000 (01:38 +0100)
committerPhil Sutter <phil@nwl.cc>
Fri, 2 Dec 2022 00:47:32 +0000 (01:47 +0100)
commit7705b2daa3bdc1143e58a4e38224a3392ff3501a
treec9cb716e30bb1e062f21b9f8ab83a2f8e9c64f23
parentd1fb4f93d35860624c8a07844942febb113f2b65
tests: xlate: Use --check to verify replay

After applying the translated rule using nft, pass the untranslated rule
to --check instead of dumping the ruleset and performing a string
search. This fixes for mandatory match reordering (e.g. addresses before
interfaces) and minor differences like /32 netmasks or even just
whitespace changes.

Fixes: 223e34b057b95 ("tests: xlate-test: Replay results for reverse direction testing")
Signed-off-by: Phil Sutter <phil@nwl.cc>
xlate-test.py