From aaf404533ace3c8a355b28deb12793fb11ef3c2a Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 21 Mar 2018 12:59:11 +0100 Subject: 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 --- tests/shell/testcases/transactions/0041nat_restore_0 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tests/shell/testcases/transactions/0041nat_restore_0 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 -- cgit v1.2.3