Debian Codegraph @

tests/shell/testcases/maps/0024named_objects_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 "192.168.2.2" "{ 192.168.2.2, 1.1.1.1, 2.2.2.2 }"; do
10
11 RULESET="
12 define m = $m"'
13 table inet x {
14 chain y {
15 type filter hook input priority 0; policy accept;
16 counter name ip saddr map $m
17 }
18 }'
19
20 $NFT -f - <<< "$RULESET" || rc=$?
21 test $rc = 1
22
23 done