summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/transactions/0021rule_0
blob: ee265abd64c9e3687ab4f410deff82c564dcac92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

set -e

RULESET="add table x
add chain x y
add rule x y ip saddr 1.1.1.1 counter
flush ruleset
add table x
add chain x y
add rule x y ip saddr 2.2.2.2 counter"

$NFT -f - <<< "$RULESET"
if [ $? -ne 0 ] ; then
        echo "E: unable to load good ruleset" >&2
        exit 1
fi