summaryrefslogtreecommitdiffstats
path: root/iptables/tests/shell/testcases/chain/0004extra-base_0
blob: cc07e4be31177dd96ac21ce5b5191f0b4c87b92f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash

case $XT_MULTI in
*xtables-nft-multi)
	;;
*)
	echo skip $XT_MULTI
	exit 0
	;;
esac

set -e

nft -f - <<EOF
table ip filter {
	chain a {
		type filter hook input priority filter
	}

        chain INPUT {
                type filter hook input priority filter
                counter packets 218 bytes 91375 accept
        }

        chain x {
                type filter hook input priority filter
        }
}
EOF

EXPECT="# Table \`filter' contains incompatible base-chains, use 'nft' tool to list them.
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -j ACCEPT"

diff -u -Z <(echo -e "$EXPECT") <($XT_MULTI iptables -S)