Debian Codegraph @

tests/shell/testcases/maps/anonymous_snat_map_2

raw
1 #!/bin/bash
2
3 #
4 # Test some error conditions for using variables to define maps
5 #
6
7 set -e
8
9 for m in "1.1.1.1" "{1.1.1.1}"; do
10
11 RULESET="
12 define m = $m"'
13 table nat {
14 chain postrouting {
15 snat ip saddr map $m
16 }
17 }
18 '
19
20 $NFT -f - <<< "$RULESET" || rc=$?
21 test $rc = 1
22
23 done