4 "name": "Add nat action on ingress with default control action",
10 "requires": "nsPlugin"
14 "$TC actions flush action nat",
20 "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 200.200.200.1",
22 "verifyCmd": "$TC actions ls action nat",
23 "matchPattern": "action order [0-9]+: nat ingress 192.168.1.1/32 200.200.200.1 pass",
26 "$TC actions flush action nat"
31 "name": "Add nat action on ingress with pipe control action",
37 "requires": "nsPlugin"
41 "$TC actions flush action nat",
47 "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 2.2.2.1 pipe index 77",
49 "verifyCmd": "$TC actions get action nat index 77",
50 "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 2.2.2.1 pipe.*index 77 ref",
53 "$TC actions flush action nat"
58 "name": "Add nat action on ingress with continue control action",
64 "requires": "nsPlugin"
68 "$TC actions flush action nat",
74 "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 continue index 1000",
76 "verifyCmd": "$TC actions get action nat index 1000",
77 "matchPattern": "action order [0-9]+: nat ingress 192.168.10.10/32 192.168.20.20 continue.*index 1000 ref",
80 "$TC actions flush action nat"
85 "name": "Add nat action on ingress with reclassify control action",
91 "requires": "nsPlugin"
95 "$TC actions flush action nat",
101 "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 reclassify index 1000",
103 "verifyCmd": "$TC actions get action nat index 1000",
104 "matchPattern": "action order [0-9]+: nat ingress 192.168.10.10/32 192.168.20.20 reclassify.*index 1000 ref",
107 "$TC actions flush action nat"
112 "name": "Add nat action on ingress with jump control action",
118 "requires": "nsPlugin"
122 "$TC actions flush action nat",
128 "cmdUnderTest": "$TC actions add action nat ingress 12.18.10.10 12.18.20.20 jump 10 index 22",
130 "verifyCmd": "$TC actions get action nat index 22",
131 "matchPattern": "action order [0-9]+: nat ingress 12.18.10.10/32 12.18.20.20 jump 10.*index 22 ref",
134 "$TC actions flush action nat"
139 "name": "Add nat action on ingress with drop control action",
145 "requires": "nsPlugin"
149 "$TC actions flush action nat",
155 "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 722",
157 "verifyCmd": "$TC actions get action nat index 722",
158 "matchPattern": "action order [0-9]+: nat ingress 1.18.1.1/32 1.18.2.2 drop.*index 722 ref",
161 "$TC actions flush action nat"
166 "name": "Add nat action on ingress with maximum index value",
172 "requires": "nsPlugin"
176 "$TC actions flush action nat",
182 "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295",
184 "verifyCmd": "$TC actions get action nat index 4294967295",
185 "matchPattern": "action order [0-9]+: nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295 ref",
188 "$TC actions flush action nat"
193 "name": "Add nat action on ingress with invalid index value",
199 "requires": "nsPlugin"
203 "$TC actions flush action nat",
209 "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295555",
210 "expExitCode": "255",
211 "verifyCmd": "$TC actions get action nat index 4294967295555",
212 "matchPattern": "action order [0-9]+: nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295555 ref",
216 "$TC actions flush action nat",
225 "name": "Add nat action on ingress with invalid IP address",
231 "requires": "nsPlugin"
235 "$TC actions flush action nat",
241 "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.1888.2.2 index 7",
242 "expExitCode": "255",
243 "verifyCmd": "$TC actions get action nat index 7",
244 "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 1.1888.2.2 pass.*index 7 ref",
248 "$TC actions flush action nat",
257 "name": "Add nat action on ingress with invalid argument",
263 "requires": "nsPlugin"
267 "$TC actions flush action nat",
273 "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.18.2.2 another_arg index 12",
274 "expExitCode": "255",
275 "verifyCmd": "$TC actions get action nat index 12",
276 "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 1.18.2.2 pass.*another_arg.*index 12 ref",
280 "$TC actions flush action nat",
289 "name": "Add nat action on ingress with DEFAULT IP address",
295 "requires": "nsPlugin"
299 "$TC actions flush action nat",
305 "cmdUnderTest": "$TC actions add action nat ingress default 10.10.10.1 index 12",
307 "verifyCmd": "$TC actions get action nat index 12",
308 "matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
311 "$TC actions flush action nat"
316 "name": "Add nat action on ingress with ANY IP address",
322 "requires": "nsPlugin"
326 "$TC actions flush action nat",
332 "cmdUnderTest": "$TC actions add action nat ingress any 10.10.10.1 index 12",
334 "verifyCmd": "$TC actions get action nat index 12",
335 "matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
338 "$TC actions flush action nat"
343 "name": "Add nat action on ingress with ALL IP address",
349 "requires": "nsPlugin"
353 "$TC actions flush action nat",
359 "cmdUnderTest": "$TC actions add action nat ingress all 10.10.10.1 index 12",
361 "verifyCmd": "$TC actions get action nat index 12",
362 "matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
365 "$TC actions flush action nat"
370 "name": "Add nat action on egress with default control action",
376 "requires": "nsPlugin"
380 "$TC actions flush action nat",
386 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1",
388 "verifyCmd": "$TC actions ls action nat",
389 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 pass",
392 "$TC actions flush action nat"
397 "name": "Add nat action on egress with pipe control action",
403 "requires": "nsPlugin"
407 "$TC actions flush action nat",
413 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 pipe",
415 "verifyCmd": "$TC actions ls action nat",
416 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 pipe",
419 "$TC actions flush action nat"
424 "name": "Add nat action on egress with continue control action",
430 "requires": "nsPlugin"
434 "$TC actions flush action nat",
440 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 continue",
442 "verifyCmd": "$TC actions ls action nat",
443 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 continue",
446 "$TC actions flush action nat"
451 "name": "Add nat action on egress with reclassify control action",
457 "requires": "nsPlugin"
461 "$TC actions flush action nat",
467 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 reclassify",
469 "verifyCmd": "$TC actions ls action nat",
470 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 reclassify",
473 "$TC actions flush action nat"
478 "name": "Add nat action on egress with jump control action",
484 "requires": "nsPlugin"
488 "$TC actions flush action nat",
494 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 jump 777",
496 "verifyCmd": "$TC actions ls action nat",
497 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 jump 777",
500 "$TC actions flush action nat"
505 "name": "Add nat action on egress with drop control action",
511 "requires": "nsPlugin"
515 "$TC actions flush action nat",
521 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 drop",
523 "verifyCmd": "$TC actions ls action nat",
524 "matchPattern": "action order [0-9]+: nat egress 10.10.10.1/32 20.20.20.1 drop",
527 "$TC actions flush action nat"
532 "name": "Add nat action on egress with DEFAULT IP address",
538 "requires": "nsPlugin"
542 "$TC actions flush action nat",
548 "cmdUnderTest": "$TC actions add action nat egress default 20.20.20.1 pipe index 10",
550 "verifyCmd": "$TC actions get action nat index 10",
551 "matchPattern": "action order [0-9]+: nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
554 "$TC actions flush action nat"
559 "name": "Add nat action on egress with ANY IP address",
565 "requires": "nsPlugin"
569 "$TC actions flush action nat",
575 "cmdUnderTest": "$TC actions add action nat egress any 20.20.20.1 pipe index 10",
577 "verifyCmd": "$TC actions get action nat index 10",
578 "matchPattern": "action order [0-9]+: nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
581 "$TC actions flush action nat"
586 "name": "Add nat action on egress with ALL IP address",
592 "requires": "nsPlugin"
596 "$TC actions flush action nat",
602 "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10",
604 "verifyCmd": "$TC actions get action nat index 10",
605 "matchPattern": "action order [0-9]+: nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
608 "$TC actions flush action nat"
613 "name": "Add nat action on egress with cookie",
619 "requires": "nsPlugin"
623 "$TC actions flush action nat",
629 "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10 cookie aa1bc2d3eeff112233445566778800a1",
631 "verifyCmd": "$TC actions get action nat index 10",
632 "matchPattern": "action order [0-9]+: nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref.*cookie aa1bc2d3eeff112233445566778800a1",
635 "$TC actions flush action nat"
640 "name": "Add nat action on ingress with cookie",
646 "requires": "nsPlugin"
650 "$TC actions flush action nat",
656 "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 10.10.10.1 reclassify index 1 cookie 112233445566778899aabbccddeeff11",
658 "verifyCmd": "$TC actions get action nat index 1",
659 "matchPattern": "action order [0-9]+: nat ingress 192.168.1.1/32 10.10.10.1 reclassify.*index 1 ref.*cookie 112233445566778899aabbccddeeff11",
662 "$TC actions flush action nat"
667 "name": "Replace nat action with invalid goto chain control",
673 "requires": "nsPlugin"
677 "$TC actions flush action nat",
682 "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 90"
684 "cmdUnderTest": "$TC actions replace action nat ingress 1.18.1.1 1.18.2.2 goto chain 42 index 90 cookie c1a0c1a0",
685 "expExitCode": "255",
686 "verifyCmd": "$TC actions get action nat index 90",
687 "matchPattern": "action order [0-9]+: nat ingress 1.18.1.1/32 1.18.2.2 drop.*index 90 ref",
690 "$TC actions flush action nat"
695 "name": "Delete nat action with valid index",
701 "requires": "nsPlugin"
705 "$TC actions flush action nat",
710 "$TC actions add action nat ingress 1.1.1.1 2.2.2.2 drop index 20"
712 "cmdUnderTest": "$TC actions del action nat index 20",
714 "verifyCmd": "$TC actions ls action nat index 20",
715 "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 2.2.2.2 drop.*index 20 ref",
718 "$TC actions flush action nat"
723 "name": "Delete nat action with invalid index",
729 "requires": "nsPlugin"
733 "$TC actions flush action nat",
738 "$TC actions add action nat ingress 1.1.1.1 2.2.2.2 drop index 20"
740 "cmdUnderTest": "$TC actions del action nat index 10",
741 "expExitCode": "255",
742 "verifyCmd": "$TC actions ls action nat index 20",
743 "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 2.2.2.2 drop.*index 20 ref",
746 "$TC actions flush action nat"