summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps/anonymous_snat_map_2
blob: 90e02038093c7e661281e433727aba8cd558f469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

#
# Test some error conditions for using variables to define maps
#

set -e

for m in "1.1.1.1" "{1.1.1.1}"; do

    RULESET="
define m = $m"'
table nat {
  chain postrouting {
    snat ip saddr map $m
  }
}
'

    $NFT -f - <<< "$RULESET" || rc=$?
    test $rc = 1

done