summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps/anonymous_snat_map_1
blob: 031de0c1a83f0ec3ef864176c154d23b2e244aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# Variable containing anonymous map can be added to a snat rule

set -e

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

$NFT -f - <<< "$RULESET"