From: Phil Sutter Date: Wed, 21 Mar 2018 11:59:11 +0000 (+0100) Subject: tests/shell: Test flush and nat chain recreate in one go X-Git-Tag: v0.8.4~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aaf404533ace3c8a355b28deb12793fb11ef3c2a;p=thirdparty%2Fnftables.git tests/shell: Test flush and nat chain recreate in one go This tests what kernel commit ae6153b50f9bf ("netfilter: nf_tables: permit second nat hook if colliding hook is going away") fixed for. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- diff --git a/tests/shell/testcases/transactions/0041nat_restore_0 b/tests/shell/testcases/transactions/0041nat_restore_0 new file mode 100755 index 00000000..62971852 --- /dev/null +++ b/tests/shell/testcases/transactions/0041nat_restore_0 @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +RULESET=" +add table ip t +add chain ip t c { type nat hook postrouting priority 0; } +" + +$NFT -f - <<< $RULESET + +RULESET=" +flush ruleset +$RULESET +" + +$NFT -f - <<< $RULESET