summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/chains/0023prio_inet_srcnat_1
blob: e4a668e1899bffb80c80184a4f8f74768877c58e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

for family in ip ip6 inet
do
	for hook in prerouting forward output
	do
		$NFT add table $family x
		$NFT add chain $family x y "{ type filter hook $hook priority srcnat; }" &> /dev/null
		if (($? == 0))
		then
			echo "E: srcnat should not be a valid priority name in $family $hook chains." >&2
			exit 1
		fi
	done
done
exit 0