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 <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
Phil Sutter 2018-03-21 12:59:11 +01:00 committed by Florian Westphal
parent 0f99689745
commit aaf404533a

View File

@ -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