summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/snat.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py/ip/snat.t')
-rw-r--r--tests/py/ip/snat.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/py/ip/snat.t b/tests/py/ip/snat.t
new file mode 100644
index 00000000..1caf7c76
--- /dev/null
+++ b/tests/py/ip/snat.t
@@ -0,0 +1,12 @@
+*ip;test-ip4
+:postrouting;type nat hook postrouting priority 0
+
+iifname "eth0" tcp dport 80-90 snat 192.168.3.2;ok
+iifname "eth0" tcp dport != 80-90 snat 192.168.3.2;ok
+iifname "eth0" tcp dport {80, 90, 23} snat 192.168.3.2;ok
+- iifname "eth0" tcp dport != {80, 90, 23} snat 192.168.3.2;ok
+- iifname "eth0" tcp dport != {80, 90, 23} snat 192.168.3.2;ok
+# BUG: invalid expression type set
+# nft: src/evaluate.c:975: expr_evaluate_relational: Assertion '0' failed.
+
+iifname "eth0" tcp dport != 23-34 snat 192.168.3.2;ok