summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps/anonymous_snat_map_1
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/maps/anonymous_snat_map_1')
-rwxr-xr-xtests/shell/testcases/maps/anonymous_snat_map_116
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/shell/testcases/maps/anonymous_snat_map_1 b/tests/shell/testcases/maps/anonymous_snat_map_1
new file mode 100755
index 00000000..031de0c1
--- /dev/null
+++ b/tests/shell/testcases/maps/anonymous_snat_map_1
@@ -0,0 +1,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"