tests/shell/testcases/transactions/0021rule_0
raw| 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | RULESET="add table x |
| 6 | add chain x y |
| 7 | add rule x y ip saddr 1.1.1.1 counter |
| 8 | flush ruleset |
| 9 | add table x |
| 10 | add chain x y |
| 11 | add rule x y ip saddr 2.2.2.2 counter" |
| 12 | |
| 13 | $NFT -f - <<< "$RULESET" |
| 14 | if [ $? -ne 0 ] ; then |
| 15 | echo "E: unable to load good ruleset" >&2 |
| 16 | exit 1 |
| 17 | fi |