summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/dnat.t.json
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-11-03 13:48:20 +0100
committerFlorian Westphal <fw@strlen.de>2020-11-05 09:40:50 +0100
commitcadc2f92d2e75394ce84eaff9380cad3a610c260 (patch)
treebd5bdbdf9a0d11e53f6518d94a1ea45844a4120f /tests/py/inet/dnat.t.json
parentbb34b08dc6ce9dadb6459cbc217036b6eb59bd73 (diff)
tests: avoid warning and add missing json test cases
make dnat.t pass in json mode. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/inet/dnat.t.json')
-rw-r--r--tests/py/inet/dnat.t.json55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/py/inet/dnat.t.json b/tests/py/inet/dnat.t.json
index ac6dac62..1b8aba62 100644
--- a/tests/py/inet/dnat.t.json
+++ b/tests/py/inet/dnat.t.json
@@ -164,3 +164,58 @@
}
]
+# meta l4proto { tcp, udp } dnat ip to 1.1.1.1:80
+[
+ {
+ "match": {
+ "left": {
+ "meta": {
+ "key": "l4proto"
+ }
+ },
+ "op": "==",
+ "right": {
+ "set": [
+ 6,
+ 17
+ ]
+ }
+ }
+ },
+ {
+ "dnat": {
+ "addr": "1.1.1.1",
+ "family": "ip",
+ "port": 80
+ }
+ }
+]
+
+# ip protocol { tcp, udp } dnat ip to 1.1.1.1:80
+[
+ {
+ "match": {
+ "left": {
+ "payload": {
+ "field": "protocol",
+ "protocol": "ip"
+ }
+ },
+ "op": "==",
+ "right": {
+ "set": [
+ 6,
+ 17
+ ]
+ }
+ }
+ },
+ {
+ "dnat": {
+ "addr": "1.1.1.1",
+ "family": "ip",
+ "port": 80
+ }
+ }
+]
+