summaryrefslogtreecommitdiffstats
path: root/iptables/tests/shell/testcases/iptables/0001-chain-refs_0
blob: e55506e8464a64a2a9a700ec31d2b26eb53f3779 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

# make sure rules are not counted in references of iptables output

set -e

$XT_MULTI iptables -N foo
$XT_MULTI iptables -L | grep 'Chain foo (0 references)'

$XT_MULTI iptables -A foo -j ACCEPT
$XT_MULTI iptables -L | grep 'Chain foo (0 references)'

$XT_MULTI iptables -A FORWARD -j foo
$XT_MULTI iptables -L | grep 'Chain foo (1 references)'