750 lines · json
1[2 {3 "id": "7565",4 "name": "Add nat action on ingress with default control action",5 "category": [6 "actions",7 "nat"8 ],9 "plugins": {10 "requires": "nsPlugin"11 },12 "setup": [13 [14 "$TC actions flush action nat",15 0,16 1,17 25518 ]19 ],20 "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 200.200.200.1",21 "expExitCode": "0",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",24 "matchCount": "1",25 "teardown": [26 "$TC actions flush action nat"27 ]28 },29 {30 "id": "fd79",31 "name": "Add nat action on ingress with pipe control action",32 "category": [33 "actions",34 "nat"35 ],36 "plugins": {37 "requires": "nsPlugin"38 },39 "setup": [40 [41 "$TC actions flush action nat",42 0,43 1,44 25545 ]46 ],47 "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 2.2.2.1 pipe index 77",48 "expExitCode": "0",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",51 "matchCount": "1",52 "teardown": [53 "$TC actions flush action nat"54 ]55 },56 {57 "id": "eab9",58 "name": "Add nat action on ingress with continue control action",59 "category": [60 "actions",61 "nat"62 ],63 "plugins": {64 "requires": "nsPlugin"65 },66 "setup": [67 [68 "$TC actions flush action nat",69 0,70 1,71 25572 ]73 ],74 "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 continue index 1000",75 "expExitCode": "0",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",78 "matchCount": "1",79 "teardown": [80 "$TC actions flush action nat"81 ]82 },83 {84 "id": "c53a",85 "name": "Add nat action on ingress with reclassify control action",86 "category": [87 "actions",88 "nat"89 ],90 "plugins": {91 "requires": "nsPlugin"92 },93 "setup": [94 [95 "$TC actions flush action nat",96 0,97 1,98 25599 ]100 ],101 "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 reclassify index 1000",102 "expExitCode": "0",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",105 "matchCount": "1",106 "teardown": [107 "$TC actions flush action nat"108 ]109 },110 {111 "id": "76c9",112 "name": "Add nat action on ingress with jump control action",113 "category": [114 "actions",115 "nat"116 ],117 "plugins": {118 "requires": "nsPlugin"119 },120 "setup": [121 [122 "$TC actions flush action nat",123 0,124 1,125 255126 ]127 ],128 "cmdUnderTest": "$TC actions add action nat ingress 12.18.10.10 12.18.20.20 jump 10 index 22",129 "expExitCode": "0",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",132 "matchCount": "1",133 "teardown": [134 "$TC actions flush action nat"135 ]136 },137 {138 "id": "24c6",139 "name": "Add nat action on ingress with drop control action",140 "category": [141 "actions",142 "nat"143 ],144 "plugins": {145 "requires": "nsPlugin"146 },147 "setup": [148 [149 "$TC actions flush action nat",150 0,151 1,152 255153 ]154 ],155 "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 722",156 "expExitCode": "0",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",159 "matchCount": "1",160 "teardown": [161 "$TC actions flush action nat"162 ]163 },164 {165 "id": "2120",166 "name": "Add nat action on ingress with maximum index value",167 "category": [168 "actions",169 "nat"170 ],171 "plugins": {172 "requires": "nsPlugin"173 },174 "setup": [175 [176 "$TC actions flush action nat",177 0,178 1,179 255180 ]181 ],182 "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295",183 "expExitCode": "0",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",186 "matchCount": "1",187 "teardown": [188 "$TC actions flush action nat"189 ]190 },191 {192 "id": "3e9d",193 "name": "Add nat action on ingress with invalid index value",194 "category": [195 "actions",196 "nat"197 ],198 "plugins": {199 "requires": "nsPlugin"200 },201 "setup": [202 [203 "$TC actions flush action nat",204 0,205 1,206 255207 ]208 ],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",213 "matchCount": "0",214 "teardown": [215 [216 "$TC actions flush action nat",217 0,218 1,219 255220 ]221 ]222 },223 {224 "id": "f6c9",225 "name": "Add nat action on ingress with invalid IP address",226 "category": [227 "actions",228 "nat"229 ],230 "plugins": {231 "requires": "nsPlugin"232 },233 "setup": [234 [235 "$TC actions flush action nat",236 0,237 1,238 255239 ]240 ],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",245 "matchCount": "0",246 "teardown": [247 [248 "$TC actions flush action nat",249 0,250 1,251 255252 ]253 ]254 },255 {256 "id": "be25",257 "name": "Add nat action on ingress with invalid argument",258 "category": [259 "actions",260 "nat"261 ],262 "plugins": {263 "requires": "nsPlugin"264 },265 "setup": [266 [267 "$TC actions flush action nat",268 0,269 1,270 255271 ]272 ],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",277 "matchCount": "0",278 "teardown": [279 [280 "$TC actions flush action nat",281 0,282 1,283 255284 ]285 ]286 },287 {288 "id": "a7bd",289 "name": "Add nat action on ingress with DEFAULT IP address",290 "category": [291 "actions",292 "nat"293 ],294 "plugins": {295 "requires": "nsPlugin"296 },297 "setup": [298 [299 "$TC actions flush action nat",300 0,301 1,302 255303 ]304 ],305 "cmdUnderTest": "$TC actions add action nat ingress default 10.10.10.1 index 12",306 "expExitCode": "0",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",309 "matchCount": "1",310 "teardown": [311 "$TC actions flush action nat"312 ]313 },314 {315 "id": "ee1e",316 "name": "Add nat action on ingress with ANY IP address",317 "category": [318 "actions",319 "nat"320 ],321 "plugins": {322 "requires": "nsPlugin"323 },324 "setup": [325 [326 "$TC actions flush action nat",327 0,328 1,329 255330 ]331 ],332 "cmdUnderTest": "$TC actions add action nat ingress any 10.10.10.1 index 12",333 "expExitCode": "0",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",336 "matchCount": "1",337 "teardown": [338 "$TC actions flush action nat"339 ]340 },341 {342 "id": "1de8",343 "name": "Add nat action on ingress with ALL IP address",344 "category": [345 "actions",346 "nat"347 ],348 "plugins": {349 "requires": "nsPlugin"350 },351 "setup": [352 [353 "$TC actions flush action nat",354 0,355 1,356 255357 ]358 ],359 "cmdUnderTest": "$TC actions add action nat ingress all 10.10.10.1 index 12",360 "expExitCode": "0",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",363 "matchCount": "1",364 "teardown": [365 "$TC actions flush action nat"366 ]367 },368 {369 "id": "8dba",370 "name": "Add nat action on egress with default control action",371 "category": [372 "actions",373 "nat"374 ],375 "plugins": {376 "requires": "nsPlugin"377 },378 "setup": [379 [380 "$TC actions flush action nat",381 0,382 1,383 255384 ]385 ],386 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1",387 "expExitCode": "0",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",390 "matchCount": "1",391 "teardown": [392 "$TC actions flush action nat"393 ]394 },395 {396 "id": "19a7",397 "name": "Add nat action on egress with pipe control action",398 "category": [399 "actions",400 "nat"401 ],402 "plugins": {403 "requires": "nsPlugin"404 },405 "setup": [406 [407 "$TC actions flush action nat",408 0,409 1,410 255411 ]412 ],413 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 pipe",414 "expExitCode": "0",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",417 "matchCount": "1",418 "teardown": [419 "$TC actions flush action nat"420 ]421 },422 {423 "id": "f1d9",424 "name": "Add nat action on egress with continue control action",425 "category": [426 "actions",427 "nat"428 ],429 "plugins": {430 "requires": "nsPlugin"431 },432 "setup": [433 [434 "$TC actions flush action nat",435 0,436 1,437 255438 ]439 ],440 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 continue",441 "expExitCode": "0",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",444 "matchCount": "1",445 "teardown": [446 "$TC actions flush action nat"447 ]448 },449 {450 "id": "6d4a",451 "name": "Add nat action on egress with reclassify control action",452 "category": [453 "actions",454 "nat"455 ],456 "plugins": {457 "requires": "nsPlugin"458 },459 "setup": [460 [461 "$TC actions flush action nat",462 0,463 1,464 255465 ]466 ],467 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 reclassify",468 "expExitCode": "0",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",471 "matchCount": "1",472 "teardown": [473 "$TC actions flush action nat"474 ]475 },476 {477 "id": "b313",478 "name": "Add nat action on egress with jump control action",479 "category": [480 "actions",481 "nat"482 ],483 "plugins": {484 "requires": "nsPlugin"485 },486 "setup": [487 [488 "$TC actions flush action nat",489 0,490 1,491 255492 ]493 ],494 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 jump 777",495 "expExitCode": "0",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",498 "matchCount": "1",499 "teardown": [500 "$TC actions flush action nat"501 ]502 },503 {504 "id": "d9fc",505 "name": "Add nat action on egress with drop control action",506 "category": [507 "actions",508 "nat"509 ],510 "plugins": {511 "requires": "nsPlugin"512 },513 "setup": [514 [515 "$TC actions flush action nat",516 0,517 1,518 255519 ]520 ],521 "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 drop",522 "expExitCode": "0",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",525 "matchCount": "1",526 "teardown": [527 "$TC actions flush action nat"528 ]529 },530 {531 "id": "a895",532 "name": "Add nat action on egress with DEFAULT IP address",533 "category": [534 "actions",535 "nat"536 ],537 "plugins": {538 "requires": "nsPlugin"539 },540 "setup": [541 [542 "$TC actions flush action nat",543 0,544 1,545 255546 ]547 ],548 "cmdUnderTest": "$TC actions add action nat egress default 20.20.20.1 pipe index 10",549 "expExitCode": "0",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",552 "matchCount": "1",553 "teardown": [554 "$TC actions flush action nat"555 ]556 },557 {558 "id": "2572",559 "name": "Add nat action on egress with ANY IP address",560 "category": [561 "actions",562 "nat"563 ],564 "plugins": {565 "requires": "nsPlugin"566 },567 "setup": [568 [569 "$TC actions flush action nat",570 0,571 1,572 255573 ]574 ],575 "cmdUnderTest": "$TC actions add action nat egress any 20.20.20.1 pipe index 10",576 "expExitCode": "0",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",579 "matchCount": "1",580 "teardown": [581 "$TC actions flush action nat"582 ]583 },584 {585 "id": "37f3",586 "name": "Add nat action on egress with ALL IP address",587 "category": [588 "actions",589 "nat"590 ],591 "plugins": {592 "requires": "nsPlugin"593 },594 "setup": [595 [596 "$TC actions flush action nat",597 0,598 1,599 255600 ]601 ],602 "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10",603 "expExitCode": "0",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",606 "matchCount": "1",607 "teardown": [608 "$TC actions flush action nat"609 ]610 },611 {612 "id": "6054",613 "name": "Add nat action on egress with cookie",614 "category": [615 "actions",616 "nat"617 ],618 "plugins": {619 "requires": "nsPlugin"620 },621 "setup": [622 [623 "$TC actions flush action nat",624 0,625 1,626 255627 ]628 ],629 "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10 cookie aa1bc2d3eeff112233445566778800a1",630 "expExitCode": "0",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",633 "matchCount": "1",634 "teardown": [635 "$TC actions flush action nat"636 ]637 },638 {639 "id": "79d6",640 "name": "Add nat action on ingress with cookie",641 "category": [642 "actions",643 "nat"644 ],645 "plugins": {646 "requires": "nsPlugin"647 },648 "setup": [649 [650 "$TC actions flush action nat",651 0,652 1,653 255654 ]655 ],656 "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 10.10.10.1 reclassify index 1 cookie 112233445566778899aabbccddeeff11",657 "expExitCode": "0",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",660 "matchCount": "1",661 "teardown": [662 "$TC actions flush action nat"663 ]664 },665 {666 "id": "4b12",667 "name": "Replace nat action with invalid goto chain control",668 "category": [669 "actions",670 "nat"671 ],672 "plugins": {673 "requires": "nsPlugin"674 },675 "setup": [676 [677 "$TC actions flush action nat",678 0,679 1,680 255681 ],682 "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 90"683 ],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",688 "matchCount": "1",689 "teardown": [690 "$TC actions flush action nat"691 ]692 },693 {694 "id": "b811",695 "name": "Delete nat action with valid index",696 "category": [697 "actions",698 "nat"699 ],700 "plugins": {701 "requires": "nsPlugin"702 },703 "setup": [704 [705 "$TC actions flush action nat",706 0,707 1,708 255709 ],710 "$TC actions add action nat ingress 1.1.1.1 2.2.2.2 drop index 20"711 ],712 "cmdUnderTest": "$TC actions del action nat index 20",713 "expExitCode": "0",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",716 "matchCount": "0",717 "teardown": [718 "$TC actions flush action nat"719 ]720 },721 {722 "id": "a521",723 "name": "Delete nat action with invalid index",724 "category": [725 "actions",726 "nat"727 ],728 "plugins": {729 "requires": "nsPlugin"730 },731 "setup": [732 [733 "$TC actions flush action nat",734 0,735 1,736 255737 ],738 "$TC actions add action nat ingress 1.1.1.1 2.2.2.2 drop index 20"739 ],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",744 "matchCount": "1",745 "teardown": [746 "$TC actions flush action nat"747 ]748 }749]750