mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
selftests: netfilter: Run nft_audit.sh in its own netns
commit2e2d9c7d4dupstream. Don't mess with the host's firewall ruleset. Since audit logging is not per-netns, add an initial delay of a second so other selftests' netns cleanups have a chance to finish. Fixes:e8dbde59ca("selftests: netfilter: Test nf_tables audit logging") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0bb1573512
commit
d9d289b78c
@@ -11,6 +11,12 @@ nft --version >/dev/null 2>&1 || {
|
||||
exit $SKIP_RC
|
||||
}
|
||||
|
||||
# Run everything in a separate network namespace
|
||||
[ "${1}" != "run" ] && { unshare -n "${0}" run; exit $?; }
|
||||
|
||||
# give other scripts a chance to finish - audit_logread sees all activity
|
||||
sleep 1
|
||||
|
||||
logfile=$(mktemp)
|
||||
rulefile=$(mktemp)
|
||||
echo "logging into $logfile"
|
||||
|
||||
Reference in New Issue
Block a user