Back to home page

OSCL-LXR

 
 

    


0001 [
0002     {
0003         "id": "7565",
0004         "name": "Add nat action on ingress with default control action",
0005         "category": [
0006             "actions",
0007             "nat"
0008         ],
0009         "setup": [
0010             [
0011                 "$TC actions flush action nat",
0012                 0,
0013                 1,
0014                 255
0015             ]
0016         ],
0017         "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 200.200.200.1",
0018         "expExitCode": "0",
0019         "verifyCmd": "$TC actions ls action nat",
0020         "matchPattern": "action order [0-9]+:  nat ingress 192.168.1.1/32 200.200.200.1 pass",
0021         "matchCount": "1",
0022         "teardown": [
0023             "$TC actions flush action nat"
0024         ]
0025     },
0026     {
0027         "id": "fd79",
0028         "name": "Add nat action on ingress with pipe control action",
0029         "category": [
0030             "actions",
0031             "nat"
0032         ],
0033         "setup": [
0034             [
0035                 "$TC actions flush action nat",
0036                 0,
0037                 1,
0038                 255
0039             ]
0040         ],
0041         "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 2.2.2.1 pipe index 77",
0042         "expExitCode": "0",
0043         "verifyCmd": "$TC actions get action nat index 77",
0044         "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 2.2.2.1 pipe.*index 77 ref",
0045         "matchCount": "1",
0046         "teardown": [
0047             "$TC actions flush action nat"
0048         ]
0049     },
0050     {
0051         "id": "eab9",
0052         "name": "Add nat action on ingress with continue control action",
0053         "category": [
0054             "actions",
0055             "nat"
0056         ],
0057         "setup": [
0058             [
0059                 "$TC actions flush action nat",
0060                 0,
0061                 1,
0062                 255
0063             ]
0064         ],
0065         "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 continue index 1000",
0066         "expExitCode": "0",
0067         "verifyCmd": "$TC actions get action nat index 1000",
0068         "matchPattern": "action order [0-9]+:  nat ingress 192.168.10.10/32 192.168.20.20 continue.*index 1000 ref",
0069         "matchCount": "1",
0070         "teardown": [
0071             "$TC actions flush action nat"
0072         ]
0073     },
0074     {
0075         "id": "c53a",
0076         "name": "Add nat action on ingress with reclassify control action",
0077         "category": [
0078             "actions",
0079             "nat"
0080         ],
0081         "setup": [
0082             [
0083                 "$TC actions flush action nat",
0084                 0,
0085                 1,
0086                 255
0087             ]
0088         ],
0089         "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 reclassify index 1000",
0090         "expExitCode": "0",
0091         "verifyCmd": "$TC actions get action nat index 1000",
0092         "matchPattern": "action order [0-9]+:  nat ingress 192.168.10.10/32 192.168.20.20 reclassify.*index 1000 ref",
0093         "matchCount": "1",
0094         "teardown": [
0095             "$TC actions flush action nat"
0096         ]
0097     },
0098     {
0099         "id": "76c9",
0100         "name": "Add nat action on ingress with jump control action",
0101         "category": [
0102             "actions",
0103             "nat"
0104         ],
0105         "setup": [
0106             [
0107                 "$TC actions flush action nat",
0108                 0,
0109                 1,
0110                 255
0111             ]
0112         ],
0113         "cmdUnderTest": "$TC actions add action nat ingress 12.18.10.10 12.18.20.20 jump 10 index 22",
0114         "expExitCode": "0",
0115         "verifyCmd": "$TC actions get action nat index 22",
0116         "matchPattern": "action order [0-9]+:  nat ingress 12.18.10.10/32 12.18.20.20 jump 10.*index 22 ref",
0117         "matchCount": "1",
0118         "teardown": [
0119             "$TC actions flush action nat"
0120         ]
0121     },
0122     {
0123         "id": "24c6",
0124         "name": "Add nat action on ingress with drop control action",
0125         "category": [
0126             "actions",
0127             "nat"
0128         ],
0129         "setup": [
0130             [
0131                 "$TC actions flush action nat",
0132                 0,
0133                 1,
0134                 255
0135             ]
0136         ],
0137         "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 722",
0138         "expExitCode": "0",
0139         "verifyCmd": "$TC actions get action nat index 722",
0140         "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 drop.*index 722 ref",
0141         "matchCount": "1",
0142         "teardown": [
0143             "$TC actions flush action nat"
0144         ]
0145     },
0146     {
0147         "id": "2120",
0148         "name": "Add nat action on ingress with maximum index value",
0149         "category": [
0150             "actions",
0151             "nat"
0152         ],
0153         "setup": [
0154             [
0155                 "$TC actions flush action nat",
0156                 0,
0157                 1,
0158                 255
0159             ]
0160         ],
0161         "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295",
0162         "expExitCode": "0",
0163         "verifyCmd": "$TC actions get action nat index 4294967295",
0164         "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295 ref",
0165         "matchCount": "1",
0166         "teardown": [
0167             "$TC actions flush action nat"
0168         ]
0169     },
0170     {
0171         "id": "3e9d",
0172         "name": "Add nat action on ingress with invalid index value",
0173         "category": [
0174             "actions",
0175             "nat"
0176         ],
0177         "setup": [
0178             [
0179                 "$TC actions flush action nat",
0180                 0,
0181                 1,
0182                 255
0183             ]
0184         ],
0185         "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295555",
0186         "expExitCode": "255",
0187         "verifyCmd": "$TC actions get action nat index 4294967295555",
0188         "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295555 ref",
0189         "matchCount": "0",
0190         "teardown": [
0191             [
0192                 "$TC actions flush action nat",
0193                 0,
0194                 1,
0195                 255
0196             ]
0197         ]
0198     },
0199     {
0200         "id": "f6c9",
0201         "name": "Add nat action on ingress with invalid IP address",
0202         "category": [
0203             "actions",
0204             "nat"
0205         ],
0206         "setup": [
0207             [
0208                 "$TC actions flush action nat",
0209                 0,
0210                 1,
0211                 255
0212             ]
0213         ],
0214         "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.1888.2.2 index 7",
0215         "expExitCode": "255",
0216         "verifyCmd": "$TC actions get action nat index 7",
0217         "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 1.1888.2.2 pass.*index 7 ref",
0218         "matchCount": "0",
0219         "teardown": [
0220             [
0221                 "$TC actions flush action nat",
0222                 0,
0223                 1,
0224                 255
0225             ]
0226         ]
0227     },
0228     {
0229         "id": "be25",
0230         "name": "Add nat action on ingress with invalid argument",
0231         "category": [
0232             "actions",
0233             "nat"
0234         ],
0235         "setup": [
0236             [
0237                 "$TC actions flush action nat",
0238                 0,
0239                 1,
0240                 255
0241             ]
0242         ],
0243         "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.18.2.2 another_arg index 12",
0244         "expExitCode": "255",
0245         "verifyCmd": "$TC actions get action nat index 12",
0246         "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 1.18.2.2 pass.*another_arg.*index 12 ref",
0247         "matchCount": "0",
0248         "teardown": [
0249             [
0250                 "$TC actions flush action nat",
0251                 0,
0252                 1,
0253                 255
0254             ]
0255         ]
0256     },
0257     {
0258         "id": "a7bd",
0259         "name": "Add nat action on ingress with DEFAULT IP address",
0260         "category": [
0261             "actions",
0262             "nat"
0263         ],
0264         "setup": [
0265             [
0266                 "$TC actions flush action nat",
0267                 0,
0268                 1,
0269                 255
0270             ]
0271         ],
0272         "cmdUnderTest": "$TC actions add action nat ingress default 10.10.10.1 index 12",
0273         "expExitCode": "0",
0274         "verifyCmd": "$TC actions get action nat index 12",
0275         "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
0276         "matchCount": "1",
0277         "teardown": [
0278             "$TC actions flush action nat"
0279         ]
0280     },
0281     {
0282         "id": "ee1e",
0283         "name": "Add nat action on ingress with ANY IP address",
0284         "category": [
0285             "actions",
0286             "nat"
0287         ],
0288         "setup": [
0289             [
0290                 "$TC actions flush action nat",
0291                 0,
0292                 1,
0293                 255
0294             ]
0295         ],
0296         "cmdUnderTest": "$TC actions add action nat ingress any 10.10.10.1 index 12",
0297         "expExitCode": "0",
0298         "verifyCmd": "$TC actions get action nat index 12",
0299         "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
0300         "matchCount": "1",
0301         "teardown": [
0302             "$TC actions flush action nat"
0303         ]
0304     },
0305     {
0306         "id": "1de8",
0307         "name": "Add nat action on ingress with ALL IP address",
0308         "category": [
0309             "actions",
0310             "nat"
0311         ],
0312         "setup": [
0313             [
0314                 "$TC actions flush action nat",
0315                 0,
0316                 1,
0317                 255
0318             ]
0319         ],
0320         "cmdUnderTest": "$TC actions add action nat ingress all 10.10.10.1 index 12",
0321         "expExitCode": "0",
0322         "verifyCmd": "$TC actions get action nat index 12",
0323         "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
0324         "matchCount": "1",
0325         "teardown": [
0326             "$TC actions flush action nat"
0327         ]
0328     },
0329     {
0330         "id": "8dba",
0331         "name": "Add nat action on egress with default control action",
0332         "category": [
0333             "actions",
0334             "nat"
0335         ],
0336         "setup": [
0337             [
0338                 "$TC actions flush action nat",
0339                 0,
0340                 1,
0341                 255
0342             ]
0343         ],
0344         "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1",
0345         "expExitCode": "0",
0346         "verifyCmd": "$TC actions ls action nat",
0347         "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 pass",
0348         "matchCount": "1",
0349         "teardown": [
0350             "$TC actions flush action nat"
0351         ]
0352     },
0353     {
0354         "id": "19a7",
0355         "name": "Add nat action on egress with pipe control action",
0356         "category": [
0357             "actions",
0358             "nat"
0359         ],
0360         "setup": [
0361             [
0362                 "$TC actions flush action nat",
0363                 0,
0364                 1,
0365                 255
0366             ]
0367         ],
0368         "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 pipe",
0369         "expExitCode": "0",
0370         "verifyCmd": "$TC actions ls action nat",
0371         "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 pipe",
0372         "matchCount": "1",
0373         "teardown": [
0374             "$TC actions flush action nat"
0375         ]
0376     },
0377     {
0378         "id": "f1d9",
0379         "name": "Add nat action on egress with continue control action",
0380         "category": [
0381             "actions",
0382             "nat"
0383         ],
0384         "setup": [
0385             [
0386                 "$TC actions flush action nat",
0387                 0,
0388                 1,
0389                 255
0390             ]
0391         ],
0392         "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 continue",
0393         "expExitCode": "0",
0394         "verifyCmd": "$TC actions ls action nat",
0395         "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 continue",
0396         "matchCount": "1",
0397         "teardown": [
0398             "$TC actions flush action nat"
0399         ]
0400     },
0401     {
0402         "id": "6d4a",
0403         "name": "Add nat action on egress with reclassify control action",
0404         "category": [
0405             "actions",
0406             "nat"
0407         ],
0408         "setup": [
0409             [
0410                 "$TC actions flush action nat",
0411                 0,
0412                 1,
0413                 255
0414             ]
0415         ],
0416         "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 reclassify",
0417         "expExitCode": "0",
0418         "verifyCmd": "$TC actions ls action nat",
0419         "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 reclassify",
0420         "matchCount": "1",
0421         "teardown": [
0422             "$TC actions flush action nat"
0423         ]
0424     },
0425     {
0426         "id": "b313",
0427         "name": "Add nat action on egress with jump control action",
0428         "category": [
0429             "actions",
0430             "nat"
0431         ],
0432         "setup": [
0433             [
0434                 "$TC actions flush action nat",
0435                 0,
0436                 1,
0437                 255
0438             ]
0439         ],
0440         "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 jump 777",
0441         "expExitCode": "0",
0442         "verifyCmd": "$TC actions ls action nat",
0443         "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 jump 777",
0444         "matchCount": "1",
0445         "teardown": [
0446             "$TC actions flush action nat"
0447         ]
0448     },
0449     {
0450         "id": "d9fc",
0451         "name": "Add nat action on egress with drop control action",
0452         "category": [
0453             "actions",
0454             "nat"
0455         ],
0456         "setup": [
0457             [
0458                 "$TC actions flush action nat",
0459                 0,
0460                 1,
0461                 255
0462             ]
0463         ],
0464         "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 drop",
0465         "expExitCode": "0",
0466         "verifyCmd": "$TC actions ls action nat",
0467         "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 drop",
0468         "matchCount": "1",
0469         "teardown": [
0470             "$TC actions flush action nat"
0471         ]
0472     },
0473     {
0474         "id": "a895",
0475         "name": "Add nat action on egress with DEFAULT IP address",
0476         "category": [
0477             "actions",
0478             "nat"
0479         ],
0480         "setup": [
0481             [
0482                 "$TC actions flush action nat",
0483                 0,
0484                 1,
0485                 255
0486             ]
0487         ],
0488         "cmdUnderTest": "$TC actions add action nat egress default 20.20.20.1 pipe index 10",
0489         "expExitCode": "0",
0490         "verifyCmd": "$TC actions get action nat index 10",
0491         "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
0492         "matchCount": "1",
0493         "teardown": [
0494             "$TC actions flush action nat"
0495         ]
0496     },
0497     {
0498         "id": "2572",
0499         "name": "Add nat action on egress with ANY IP address",
0500         "category": [
0501             "actions",
0502             "nat"
0503         ],
0504         "setup": [
0505             [
0506                 "$TC actions flush action nat",
0507                 0,
0508                 1,
0509                 255
0510             ]
0511         ],
0512         "cmdUnderTest": "$TC actions add action nat egress any 20.20.20.1 pipe index 10",
0513         "expExitCode": "0",
0514         "verifyCmd": "$TC actions get action nat index 10",
0515         "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
0516         "matchCount": "1",
0517         "teardown": [
0518             "$TC actions flush action nat"
0519         ]
0520     },
0521     {
0522         "id": "37f3",
0523         "name": "Add nat action on egress with ALL IP address",
0524         "category": [
0525             "actions",
0526             "nat"
0527         ],
0528         "setup": [
0529             [
0530                 "$TC actions flush action nat",
0531                 0,
0532                 1,
0533                 255
0534             ]
0535         ],
0536         "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10",
0537         "expExitCode": "0",
0538         "verifyCmd": "$TC actions get action nat index 10",
0539         "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
0540         "matchCount": "1",
0541         "teardown": [
0542             "$TC actions flush action nat"
0543         ]
0544     },
0545     {
0546         "id": "6054",
0547         "name": "Add nat action on egress with cookie",
0548         "category": [
0549             "actions",
0550             "nat"
0551         ],
0552         "setup": [
0553             [
0554                 "$TC actions flush action nat",
0555                 0,
0556                 1,
0557                 255
0558             ]
0559         ],
0560         "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10 cookie aa1bc2d3eeff112233445566778800a1",
0561         "expExitCode": "0",
0562         "verifyCmd": "$TC actions get action nat index 10",
0563         "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref.*cookie aa1bc2d3eeff112233445566778800a1",
0564         "matchCount": "1",
0565         "teardown": [
0566             "$TC actions flush action nat"
0567         ]
0568     },
0569     {
0570         "id": "79d6",
0571         "name": "Add nat action on ingress with cookie",
0572         "category": [
0573             "actions",
0574             "nat"
0575         ],
0576         "setup": [
0577             [
0578                 "$TC actions flush action nat",
0579                 0,
0580                 1,
0581                 255
0582             ]
0583         ],
0584         "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 10.10.10.1 reclassify index 1 cookie 112233445566778899aabbccddeeff11",
0585         "expExitCode": "0",
0586         "verifyCmd": "$TC actions get action nat index 1",
0587         "matchPattern": "action order [0-9]+:  nat ingress 192.168.1.1/32 10.10.10.1 reclassify.*index 1 ref.*cookie 112233445566778899aabbccddeeff11",
0588         "matchCount": "1",
0589         "teardown": [
0590             "$TC actions flush action nat"
0591         ]
0592     },
0593     {
0594         "id": "4b12",
0595         "name": "Replace nat action with invalid goto chain control",
0596         "category": [
0597             "actions",
0598             "nat"
0599         ],
0600         "setup": [
0601             [
0602                 "$TC actions flush action nat",
0603                 0,
0604                 1,
0605                 255
0606             ],
0607             "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 90"
0608         ],
0609         "cmdUnderTest": "$TC actions replace action nat ingress 1.18.1.1 1.18.2.2 goto chain 42 index 90 cookie c1a0c1a0",
0610         "expExitCode": "255",
0611         "verifyCmd": "$TC actions get action nat index 90",
0612         "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 drop.*index 90 ref",
0613         "matchCount": "1",
0614         "teardown": [
0615             "$TC actions flush action nat"
0616         ]
0617     }
0618 ]