4 "name": "Add nat action on ingress with default control action",
11 "$TC actions flush action nat",
17 "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 200.200.200.1",
19 "verifyCmd": "$TC actions ls action nat",
20 "matchPattern": "action order [0-9]+: nat ingress 192.168.1.1/32 200.200.200.1 pass",
23 "$TC actions flush action nat"
28 "name": "Add nat action on ingress with pipe control action",
35 "$TC actions flush action nat",
41 "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 2.2.2.1 pipe index 77",
43 "verifyCmd": "$TC actions get action nat index 77",
44 "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 2.2.2.1 pipe.*index 77 ref",
47 "$TC actions flush action nat"
52 "name": "Add nat action on ingress with continue control action",
59 "$TC actions flush action nat",
65 "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 continue index 1000",
67 "verifyCmd": "$TC actions get action nat index 1000",
68 "matchPattern": "action order [0-9]+: nat ingress 192.168.10.10/32 192.168.20.20 continue.*index 1000 ref",
71 "$TC actions flush action nat"
76 "name": "Add nat action on ingress with reclassify control action",
83 "$TC actions flush action nat",
89 "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 reclassify index 1000",
91 "verifyCmd": "$TC actions get action nat index 1000",
92 "matchPattern": "action order [0-9]+: nat ingress 192.168.10.10/32 192.168.20.20 reclassify.*index 1000 ref",
95 "$TC actions flush action nat"
100 "name": "Add nat action on ingress with jump control action",
107 "$TC actions flush action nat",
113 "cmdUnderTest": "$TC actions add action nat ingress 12.18.10.10 12.18.20.20 jump 10 index 22",
115 "verifyCmd": "$TC actions get action nat index 22",
116 "matchPattern": "action order [0-9]+: nat ingress 12.18.10.10/32 12.18.20.20 jump 10.*index 22 ref",
119 "$TC actions flush action nat"
124 "name": "Add nat action on ingress with drop control action",
131 "$TC actions flush action nat",
137 "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 722",
139 "verifyCmd": "$TC actions get action nat index 722",
140 "matchPattern": "action order [0-9]+: nat ingress 1.18.1.1/32 1.18.2.2 drop.*index 722 ref",
143 "$TC actions flush action nat"
148 "name": "Add nat action on ingress with maximum index value",
155 "$TC actions flush action nat",
161 "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295",
163 "verifyCmd": "$TC actions get action nat index 4294967295",
164 "matchPattern": "action order [0-9]+: nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295 ref",
167 "$TC actions flush action nat"
172 "name": "Add nat action on ingress with invalid index value",
179 "$TC actions flush action nat",
185 "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295555",
186 "expExitCode": "255",
187 "verifyCmd": "$TC actions get action nat index 4294967295555",
188 "matchPattern": "action order [0-9]+: nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295555 ref",
192 "$TC actions flush action nat",
201 "name": "Add nat action on ingress with invalid IP address",
208 "$TC actions flush action nat",
214 "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.1888.2.2 index 7",
215 "expExitCode": "255",
216 "verifyCmd": "$TC actions get action nat index 7",
217 "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 1.1888.2.2 pass.*index 7 ref",
221 "$TC actions flush action nat",
230 "name": "Add nat action on ingress with invalid argument",
237 "$TC actions flush action nat",
243 "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.18.2.2 another_arg index 12",
244 "expExitCode": "255",
245 "verifyCmd": "$TC actions get action nat index 12",
246 "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 1.18.2.2 pass.*another_arg.*index 12 ref",
250 "$TC actions flush action nat",
259 "name": "Add nat action on ingress with DEFAULT IP address",
266 "$TC actions flush action nat",
272 "cmdUnderTest": "$TC actions add action nat ingress default 10.10.10.1 index 12",
274 "verifyCmd": "$TC actions get action nat index 12",
275 "matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
278 "$TC actions flush action nat"
283 "name": "Add nat action on ingress with ANY IP address",
290 "$TC actions flush action nat",
296 "cmdUnderTest": "$TC actions add action nat ingress any 10.10.10.1 index 12",
298 "verifyCmd": "$TC actions get action nat index 12",
299 "matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
302 "$TC actions flush action nat"
307 "name": "Add nat action on ingress with ALL IP address",
314 "$TC actions flush action nat",
320 "cmdUnderTest": "$TC actions add action nat ingress all 10.10.10.1 index 12",
322 "verifyCmd": "$TC actions get action nat index 12",
323 "matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
326 "$TC actions flush action nat"
331 "name": "Add nat action on egress with default control action",
338 "$TC actions flush action nat",
344 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1",
346 "verifyCmd": "$TC actions ls action nat",
347 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 pass",
350 "$TC actions flush action nat"
355 "name": "Add nat action on egress with pipe control action",
362 "$TC actions flush action nat",
368 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 pipe",
370 "verifyCmd": "$TC actions ls action nat",
371 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 pipe",
374 "$TC actions flush action nat"
379 "name": "Add nat action on egress with continue control action",
386 "$TC actions flush action nat",
392 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 continue",
394 "verifyCmd": "$TC actions ls action nat",
395 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 continue",
398 "$TC actions flush action nat"
403 "name": "Add nat action on egress with reclassify control action",
410 "$TC actions flush action nat",
416 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 reclassify",
418 "verifyCmd": "$TC actions ls action nat",
419 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 reclassify",
422 "$TC actions flush action nat"
427 "name": "Add nat action on egress with jump control action",
434 "$TC actions flush action nat",
440 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 jump 777",
442 "verifyCmd": "$TC actions ls action nat",
443 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 jump 777",
446 "$TC actions flush action nat"
451 "name": "Add nat action on egress with drop control action",
458 "$TC actions flush action nat",
464 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 drop",
466 "verifyCmd": "$TC actions ls action nat",
467 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 drop",
470 "$TC actions flush action nat"
475 "name": "Add nat action on egress with DEFAULT IP address",
482 "$TC actions flush action nat",
488 "cmdUnderTest": "$TC actions add action nat egress default 20.20.20.1 pipe index 10",
490 "verifyCmd": "$TC actions get action nat index 10",
491 "matchPattern": "action order [0-9]+: nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
494 "$TC actions flush action nat"
499 "name": "Add nat action on egress with ANY IP address",
506 "$TC actions flush action nat",
512 "cmdUnderTest": "$TC actions add action nat egress any 20.20.20.1 pipe index 10",
514 "verifyCmd": "$TC actions get action nat index 10",
515 "matchPattern": "action order [0-9]+: nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
518 "$TC actions flush action nat"
523 "name": "Add nat action on egress with ALL IP address",
530 "$TC actions flush action nat",
536 "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10",
538 "verifyCmd": "$TC actions get action nat index 10",
539 "matchPattern": "action order [0-9]+: nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
542 "$TC actions flush action nat"
547 "name": "Add nat action on egress with cookie",
554 "$TC actions flush action nat",
560 "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10 cookie aa1bc2d3eeff112233445566778800a1",
562 "verifyCmd": "$TC actions get action nat index 10",
563 "matchPattern": "action order [0-9]+: nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref.*cookie aa1bc2d3eeff112233445566778800a1",
566 "$TC actions flush action nat"
571 "name": "Add nat action on ingress with cookie",
578 "$TC actions flush action nat",
584 "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 10.10.10.1 reclassify index 1 cookie 112233445566778899aabbccddeeff11",
586 "verifyCmd": "$TC actions get action nat index 1",
587 "matchPattern": "action order [0-9]+: nat ingress 192.168.1.1/32 10.10.10.1 reclassify.*index 1 ref.*cookie 112233445566778899aabbccddeeff11",
590 "$TC actions flush action nat"