summaryrefslogtreecommitdiffstats
path: root/iptables/tests/shell/testcases/nft-only/0011-zero-needs-compat_0
blob: e276a953234cf40d48cdfb35e912242ca5098c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

[[ $XT_MULTI == *xtables-nft-multi ]] || { echo "skip $XT_MULTI"; exit 0; }

set -e

rule="-p tcp -m tcp --dport 27374 -c 23 42 -j TPROXY --on-port 50080"
for cmd in iptables ip6tables; do
	$XT_MULTI $cmd -t mangle -A PREROUTING $rule
	$XT_MULTI $cmd -t mangle -Z
	$XT_MULTI $cmd -t mangle -v -S | grep -q -- "${rule/23 42/0 0}"
done