xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/nat.json (revision 736ac8146404560215e7aaf4e28fc2d8746a72d1)
1*736ac814SKeara Leibovitz[
2*736ac814SKeara Leibovitz    {
3*736ac814SKeara Leibovitz        "id": "7565",
4*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with default control action",
5*736ac814SKeara Leibovitz        "category": [
6*736ac814SKeara Leibovitz            "actions",
7*736ac814SKeara Leibovitz            "nat"
8*736ac814SKeara Leibovitz        ],
9*736ac814SKeara Leibovitz        "setup": [
10*736ac814SKeara Leibovitz            [
11*736ac814SKeara Leibovitz                "$TC actions flush action nat",
12*736ac814SKeara Leibovitz                0,
13*736ac814SKeara Leibovitz                1,
14*736ac814SKeara Leibovitz                255
15*736ac814SKeara Leibovitz            ]
16*736ac814SKeara Leibovitz        ],
17*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 200.200.200.1",
18*736ac814SKeara Leibovitz        "expExitCode": "0",
19*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
20*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 192.168.1.1/32 200.200.200.1 pass",
21*736ac814SKeara Leibovitz        "matchCount": "1",
22*736ac814SKeara Leibovitz        "teardown": [
23*736ac814SKeara Leibovitz            "$TC actions flush action nat"
24*736ac814SKeara Leibovitz        ]
25*736ac814SKeara Leibovitz    },
26*736ac814SKeara Leibovitz    {
27*736ac814SKeara Leibovitz        "id": "fd79",
28*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with pipe control action",
29*736ac814SKeara Leibovitz        "category": [
30*736ac814SKeara Leibovitz            "actions",
31*736ac814SKeara Leibovitz            "nat"
32*736ac814SKeara Leibovitz        ],
33*736ac814SKeara Leibovitz        "setup": [
34*736ac814SKeara Leibovitz            [
35*736ac814SKeara Leibovitz                "$TC actions flush action nat",
36*736ac814SKeara Leibovitz                0,
37*736ac814SKeara Leibovitz                1,
38*736ac814SKeara Leibovitz                255
39*736ac814SKeara Leibovitz            ]
40*736ac814SKeara Leibovitz        ],
41*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 2.2.2.1 pipe index 77",
42*736ac814SKeara Leibovitz        "expExitCode": "0",
43*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 77",
44*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 2.2.2.1 pipe.*index 77 ref",
45*736ac814SKeara Leibovitz        "matchCount": "1",
46*736ac814SKeara Leibovitz        "teardown": [
47*736ac814SKeara Leibovitz            "$TC actions flush action nat"
48*736ac814SKeara Leibovitz        ]
49*736ac814SKeara Leibovitz    },
50*736ac814SKeara Leibovitz    {
51*736ac814SKeara Leibovitz        "id": "eab9",
52*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with continue control action",
53*736ac814SKeara Leibovitz        "category": [
54*736ac814SKeara Leibovitz            "actions",
55*736ac814SKeara Leibovitz            "nat"
56*736ac814SKeara Leibovitz        ],
57*736ac814SKeara Leibovitz        "setup": [
58*736ac814SKeara Leibovitz            [
59*736ac814SKeara Leibovitz                "$TC actions flush action nat",
60*736ac814SKeara Leibovitz                0,
61*736ac814SKeara Leibovitz                1,
62*736ac814SKeara Leibovitz                255
63*736ac814SKeara Leibovitz            ]
64*736ac814SKeara Leibovitz        ],
65*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 continue index 1000",
66*736ac814SKeara Leibovitz        "expExitCode": "0",
67*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 1000",
68*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 192.168.10.10/32 192.168.20.20 continue.*index 1000 ref",
69*736ac814SKeara Leibovitz        "matchCount": "1",
70*736ac814SKeara Leibovitz        "teardown": [
71*736ac814SKeara Leibovitz            "$TC actions flush action nat"
72*736ac814SKeara Leibovitz        ]
73*736ac814SKeara Leibovitz    },
74*736ac814SKeara Leibovitz    {
75*736ac814SKeara Leibovitz        "id": "c53a",
76*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with reclassify control action",
77*736ac814SKeara Leibovitz        "category": [
78*736ac814SKeara Leibovitz            "actions",
79*736ac814SKeara Leibovitz            "nat"
80*736ac814SKeara Leibovitz        ],
81*736ac814SKeara Leibovitz        "setup": [
82*736ac814SKeara Leibovitz            [
83*736ac814SKeara Leibovitz                "$TC actions flush action nat",
84*736ac814SKeara Leibovitz                0,
85*736ac814SKeara Leibovitz                1,
86*736ac814SKeara Leibovitz                255
87*736ac814SKeara Leibovitz            ]
88*736ac814SKeara Leibovitz        ],
89*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 reclassify index 1000",
90*736ac814SKeara Leibovitz        "expExitCode": "0",
91*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 1000",
92*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 192.168.10.10/32 192.168.20.20 reclassify.*index 1000 ref",
93*736ac814SKeara Leibovitz        "matchCount": "1",
94*736ac814SKeara Leibovitz        "teardown": [
95*736ac814SKeara Leibovitz            "$TC actions flush action nat"
96*736ac814SKeara Leibovitz        ]
97*736ac814SKeara Leibovitz    },
98*736ac814SKeara Leibovitz    {
99*736ac814SKeara Leibovitz        "id": "76c9",
100*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with jump control action",
101*736ac814SKeara Leibovitz        "category": [
102*736ac814SKeara Leibovitz            "actions",
103*736ac814SKeara Leibovitz            "nat"
104*736ac814SKeara Leibovitz        ],
105*736ac814SKeara Leibovitz        "setup": [
106*736ac814SKeara Leibovitz            [
107*736ac814SKeara Leibovitz                "$TC actions flush action nat",
108*736ac814SKeara Leibovitz                0,
109*736ac814SKeara Leibovitz                1,
110*736ac814SKeara Leibovitz                255
111*736ac814SKeara Leibovitz            ]
112*736ac814SKeara Leibovitz        ],
113*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 12.18.10.10 12.18.20.20 jump 10 index 22",
114*736ac814SKeara Leibovitz        "expExitCode": "0",
115*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 22",
116*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 12.18.10.10/32 12.18.20.20 jump 10.*index 22 ref",
117*736ac814SKeara Leibovitz        "matchCount": "1",
118*736ac814SKeara Leibovitz        "teardown": [
119*736ac814SKeara Leibovitz            "$TC actions flush action nat"
120*736ac814SKeara Leibovitz        ]
121*736ac814SKeara Leibovitz    },
122*736ac814SKeara Leibovitz    {
123*736ac814SKeara Leibovitz        "id": "24c6",
124*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with drop control action",
125*736ac814SKeara Leibovitz        "category": [
126*736ac814SKeara Leibovitz            "actions",
127*736ac814SKeara Leibovitz            "nat"
128*736ac814SKeara Leibovitz        ],
129*736ac814SKeara Leibovitz        "setup": [
130*736ac814SKeara Leibovitz            [
131*736ac814SKeara Leibovitz                "$TC actions flush action nat",
132*736ac814SKeara Leibovitz                0,
133*736ac814SKeara Leibovitz                1,
134*736ac814SKeara Leibovitz                255
135*736ac814SKeara Leibovitz            ]
136*736ac814SKeara Leibovitz        ],
137*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 722",
138*736ac814SKeara Leibovitz        "expExitCode": "0",
139*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 722",
140*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 drop.*index 722 ref",
141*736ac814SKeara Leibovitz        "matchCount": "1",
142*736ac814SKeara Leibovitz        "teardown": [
143*736ac814SKeara Leibovitz            "$TC actions flush action nat"
144*736ac814SKeara Leibovitz        ]
145*736ac814SKeara Leibovitz    },
146*736ac814SKeara Leibovitz    {
147*736ac814SKeara Leibovitz        "id": "2120",
148*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with maximum index value",
149*736ac814SKeara Leibovitz        "category": [
150*736ac814SKeara Leibovitz            "actions",
151*736ac814SKeara Leibovitz            "nat"
152*736ac814SKeara Leibovitz        ],
153*736ac814SKeara Leibovitz        "setup": [
154*736ac814SKeara Leibovitz            [
155*736ac814SKeara Leibovitz                "$TC actions flush action nat",
156*736ac814SKeara Leibovitz                0,
157*736ac814SKeara Leibovitz                1,
158*736ac814SKeara Leibovitz                255
159*736ac814SKeara Leibovitz            ]
160*736ac814SKeara Leibovitz        ],
161*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295",
162*736ac814SKeara Leibovitz        "expExitCode": "0",
163*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 4294967295",
164*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295 ref",
165*736ac814SKeara Leibovitz        "matchCount": "1",
166*736ac814SKeara Leibovitz        "teardown": [
167*736ac814SKeara Leibovitz            "$TC actions flush action nat"
168*736ac814SKeara Leibovitz        ]
169*736ac814SKeara Leibovitz    },
170*736ac814SKeara Leibovitz    {
171*736ac814SKeara Leibovitz        "id": "3e9d",
172*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with invalid index value",
173*736ac814SKeara Leibovitz        "category": [
174*736ac814SKeara Leibovitz            "actions",
175*736ac814SKeara Leibovitz            "nat"
176*736ac814SKeara Leibovitz        ],
177*736ac814SKeara Leibovitz        "setup": [
178*736ac814SKeara Leibovitz            [
179*736ac814SKeara Leibovitz                "$TC actions flush action nat",
180*736ac814SKeara Leibovitz                0,
181*736ac814SKeara Leibovitz                1,
182*736ac814SKeara Leibovitz                255
183*736ac814SKeara Leibovitz            ]
184*736ac814SKeara Leibovitz        ],
185*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295555",
186*736ac814SKeara Leibovitz        "expExitCode": "255",
187*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 4294967295555",
188*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295555 ref",
189*736ac814SKeara Leibovitz        "matchCount": "0",
190*736ac814SKeara Leibovitz        "teardown": [
191*736ac814SKeara Leibovitz            [
192*736ac814SKeara Leibovitz                "$TC actions flush action nat",
193*736ac814SKeara Leibovitz                0,
194*736ac814SKeara Leibovitz                1,
195*736ac814SKeara Leibovitz                255
196*736ac814SKeara Leibovitz            ]
197*736ac814SKeara Leibovitz        ]
198*736ac814SKeara Leibovitz    },
199*736ac814SKeara Leibovitz    {
200*736ac814SKeara Leibovitz        "id": "f6c9",
201*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with invalid IP address",
202*736ac814SKeara Leibovitz        "category": [
203*736ac814SKeara Leibovitz            "actions",
204*736ac814SKeara Leibovitz            "nat"
205*736ac814SKeara Leibovitz        ],
206*736ac814SKeara Leibovitz        "setup": [
207*736ac814SKeara Leibovitz            [
208*736ac814SKeara Leibovitz                "$TC actions flush action nat",
209*736ac814SKeara Leibovitz                0,
210*736ac814SKeara Leibovitz                1,
211*736ac814SKeara Leibovitz                255
212*736ac814SKeara Leibovitz            ]
213*736ac814SKeara Leibovitz        ],
214*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.1888.2.2 index 7",
215*736ac814SKeara Leibovitz        "expExitCode": "255",
216*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 7",
217*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 1.1888.2.2 pass.*index 7 ref",
218*736ac814SKeara Leibovitz        "matchCount": "0",
219*736ac814SKeara Leibovitz        "teardown": [
220*736ac814SKeara Leibovitz            [
221*736ac814SKeara Leibovitz                "$TC actions flush action nat",
222*736ac814SKeara Leibovitz                0,
223*736ac814SKeara Leibovitz                1,
224*736ac814SKeara Leibovitz                255
225*736ac814SKeara Leibovitz            ]
226*736ac814SKeara Leibovitz        ]
227*736ac814SKeara Leibovitz    },
228*736ac814SKeara Leibovitz    {
229*736ac814SKeara Leibovitz        "id": "be25",
230*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with invalid argument",
231*736ac814SKeara Leibovitz        "category": [
232*736ac814SKeara Leibovitz            "actions",
233*736ac814SKeara Leibovitz            "nat"
234*736ac814SKeara Leibovitz        ],
235*736ac814SKeara Leibovitz        "setup": [
236*736ac814SKeara Leibovitz            [
237*736ac814SKeara Leibovitz                "$TC actions flush action nat",
238*736ac814SKeara Leibovitz                0,
239*736ac814SKeara Leibovitz                1,
240*736ac814SKeara Leibovitz                255
241*736ac814SKeara Leibovitz            ]
242*736ac814SKeara Leibovitz        ],
243*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.18.2.2 another_arg index 12",
244*736ac814SKeara Leibovitz        "expExitCode": "255",
245*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 12",
246*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 1.18.2.2 pass.*another_arg.*index 12 ref",
247*736ac814SKeara Leibovitz        "matchCount": "0",
248*736ac814SKeara Leibovitz        "teardown": [
249*736ac814SKeara Leibovitz            [
250*736ac814SKeara Leibovitz                "$TC actions flush action nat",
251*736ac814SKeara Leibovitz                0,
252*736ac814SKeara Leibovitz                1,
253*736ac814SKeara Leibovitz                255
254*736ac814SKeara Leibovitz            ]
255*736ac814SKeara Leibovitz        ]
256*736ac814SKeara Leibovitz    },
257*736ac814SKeara Leibovitz    {
258*736ac814SKeara Leibovitz        "id": "a7bd",
259*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with DEFAULT IP address",
260*736ac814SKeara Leibovitz        "category": [
261*736ac814SKeara Leibovitz            "actions",
262*736ac814SKeara Leibovitz            "nat"
263*736ac814SKeara Leibovitz        ],
264*736ac814SKeara Leibovitz        "setup": [
265*736ac814SKeara Leibovitz            [
266*736ac814SKeara Leibovitz                "$TC actions flush action nat",
267*736ac814SKeara Leibovitz                0,
268*736ac814SKeara Leibovitz                1,
269*736ac814SKeara Leibovitz                255
270*736ac814SKeara Leibovitz            ]
271*736ac814SKeara Leibovitz        ],
272*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress default 10.10.10.1 index 12",
273*736ac814SKeara Leibovitz        "expExitCode": "0",
274*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 12",
275*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
276*736ac814SKeara Leibovitz        "matchCount": "1",
277*736ac814SKeara Leibovitz        "teardown": [
278*736ac814SKeara Leibovitz            "$TC actions flush action nat"
279*736ac814SKeara Leibovitz        ]
280*736ac814SKeara Leibovitz    },
281*736ac814SKeara Leibovitz    {
282*736ac814SKeara Leibovitz        "id": "ee1e",
283*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with ANY IP address",
284*736ac814SKeara Leibovitz        "category": [
285*736ac814SKeara Leibovitz            "actions",
286*736ac814SKeara Leibovitz            "nat"
287*736ac814SKeara Leibovitz        ],
288*736ac814SKeara Leibovitz        "setup": [
289*736ac814SKeara Leibovitz            [
290*736ac814SKeara Leibovitz                "$TC actions flush action nat",
291*736ac814SKeara Leibovitz                0,
292*736ac814SKeara Leibovitz                1,
293*736ac814SKeara Leibovitz                255
294*736ac814SKeara Leibovitz            ]
295*736ac814SKeara Leibovitz        ],
296*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress any 10.10.10.1 index 12",
297*736ac814SKeara Leibovitz        "expExitCode": "0",
298*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 12",
299*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
300*736ac814SKeara Leibovitz        "matchCount": "1",
301*736ac814SKeara Leibovitz        "teardown": [
302*736ac814SKeara Leibovitz            "$TC actions flush action nat"
303*736ac814SKeara Leibovitz        ]
304*736ac814SKeara Leibovitz    },
305*736ac814SKeara Leibovitz    {
306*736ac814SKeara Leibovitz        "id": "1de8",
307*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with ALL IP address",
308*736ac814SKeara Leibovitz        "category": [
309*736ac814SKeara Leibovitz            "actions",
310*736ac814SKeara Leibovitz            "nat"
311*736ac814SKeara Leibovitz        ],
312*736ac814SKeara Leibovitz        "setup": [
313*736ac814SKeara Leibovitz            [
314*736ac814SKeara Leibovitz                "$TC actions flush action nat",
315*736ac814SKeara Leibovitz                0,
316*736ac814SKeara Leibovitz                1,
317*736ac814SKeara Leibovitz                255
318*736ac814SKeara Leibovitz            ]
319*736ac814SKeara Leibovitz        ],
320*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress all 10.10.10.1 index 12",
321*736ac814SKeara Leibovitz        "expExitCode": "0",
322*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 12",
323*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
324*736ac814SKeara Leibovitz        "matchCount": "1",
325*736ac814SKeara Leibovitz        "teardown": [
326*736ac814SKeara Leibovitz            "$TC actions flush action nat"
327*736ac814SKeara Leibovitz        ]
328*736ac814SKeara Leibovitz    },
329*736ac814SKeara Leibovitz    {
330*736ac814SKeara Leibovitz        "id": "8dba",
331*736ac814SKeara Leibovitz        "name": "Add nat action on egress with default control action",
332*736ac814SKeara Leibovitz        "category": [
333*736ac814SKeara Leibovitz            "actions",
334*736ac814SKeara Leibovitz            "nat"
335*736ac814SKeara Leibovitz        ],
336*736ac814SKeara Leibovitz        "setup": [
337*736ac814SKeara Leibovitz            [
338*736ac814SKeara Leibovitz                "$TC actions flush action nat",
339*736ac814SKeara Leibovitz                0,
340*736ac814SKeara Leibovitz                1,
341*736ac814SKeara Leibovitz                255
342*736ac814SKeara Leibovitz            ]
343*736ac814SKeara Leibovitz        ],
344*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1",
345*736ac814SKeara Leibovitz        "expExitCode": "0",
346*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
347*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 pass",
348*736ac814SKeara Leibovitz        "matchCount": "1",
349*736ac814SKeara Leibovitz        "teardown": [
350*736ac814SKeara Leibovitz            "$TC actions flush action nat"
351*736ac814SKeara Leibovitz        ]
352*736ac814SKeara Leibovitz    },
353*736ac814SKeara Leibovitz    {
354*736ac814SKeara Leibovitz        "id": "19a7",
355*736ac814SKeara Leibovitz        "name": "Add nat action on egress with pipe control action",
356*736ac814SKeara Leibovitz        "category": [
357*736ac814SKeara Leibovitz            "actions",
358*736ac814SKeara Leibovitz            "nat"
359*736ac814SKeara Leibovitz        ],
360*736ac814SKeara Leibovitz        "setup": [
361*736ac814SKeara Leibovitz            [
362*736ac814SKeara Leibovitz                "$TC actions flush action nat",
363*736ac814SKeara Leibovitz                0,
364*736ac814SKeara Leibovitz                1,
365*736ac814SKeara Leibovitz                255
366*736ac814SKeara Leibovitz            ]
367*736ac814SKeara Leibovitz        ],
368*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 pipe",
369*736ac814SKeara Leibovitz        "expExitCode": "0",
370*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
371*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 pipe",
372*736ac814SKeara Leibovitz        "matchCount": "1",
373*736ac814SKeara Leibovitz        "teardown": [
374*736ac814SKeara Leibovitz            "$TC actions flush action nat"
375*736ac814SKeara Leibovitz        ]
376*736ac814SKeara Leibovitz    },
377*736ac814SKeara Leibovitz    {
378*736ac814SKeara Leibovitz        "id": "f1d9",
379*736ac814SKeara Leibovitz        "name": "Add nat action on egress with continue control action",
380*736ac814SKeara Leibovitz        "category": [
381*736ac814SKeara Leibovitz            "actions",
382*736ac814SKeara Leibovitz            "nat"
383*736ac814SKeara Leibovitz        ],
384*736ac814SKeara Leibovitz        "setup": [
385*736ac814SKeara Leibovitz            [
386*736ac814SKeara Leibovitz                "$TC actions flush action nat",
387*736ac814SKeara Leibovitz                0,
388*736ac814SKeara Leibovitz                1,
389*736ac814SKeara Leibovitz                255
390*736ac814SKeara Leibovitz            ]
391*736ac814SKeara Leibovitz        ],
392*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 continue",
393*736ac814SKeara Leibovitz        "expExitCode": "0",
394*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
395*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 continue",
396*736ac814SKeara Leibovitz        "matchCount": "1",
397*736ac814SKeara Leibovitz        "teardown": [
398*736ac814SKeara Leibovitz            "$TC actions flush action nat"
399*736ac814SKeara Leibovitz        ]
400*736ac814SKeara Leibovitz    },
401*736ac814SKeara Leibovitz    {
402*736ac814SKeara Leibovitz        "id": "6d4a",
403*736ac814SKeara Leibovitz        "name": "Add nat action on egress with reclassify control action",
404*736ac814SKeara Leibovitz        "category": [
405*736ac814SKeara Leibovitz            "actions",
406*736ac814SKeara Leibovitz            "nat"
407*736ac814SKeara Leibovitz        ],
408*736ac814SKeara Leibovitz        "setup": [
409*736ac814SKeara Leibovitz            [
410*736ac814SKeara Leibovitz                "$TC actions flush action nat",
411*736ac814SKeara Leibovitz                0,
412*736ac814SKeara Leibovitz                1,
413*736ac814SKeara Leibovitz                255
414*736ac814SKeara Leibovitz            ]
415*736ac814SKeara Leibovitz        ],
416*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 reclassify",
417*736ac814SKeara Leibovitz        "expExitCode": "0",
418*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
419*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 reclassify",
420*736ac814SKeara Leibovitz        "matchCount": "1",
421*736ac814SKeara Leibovitz        "teardown": [
422*736ac814SKeara Leibovitz            "$TC actions flush action nat"
423*736ac814SKeara Leibovitz        ]
424*736ac814SKeara Leibovitz    },
425*736ac814SKeara Leibovitz    {
426*736ac814SKeara Leibovitz        "id": "b313",
427*736ac814SKeara Leibovitz        "name": "Add nat action on egress with jump control action",
428*736ac814SKeara Leibovitz        "category": [
429*736ac814SKeara Leibovitz            "actions",
430*736ac814SKeara Leibovitz            "nat"
431*736ac814SKeara Leibovitz        ],
432*736ac814SKeara Leibovitz        "setup": [
433*736ac814SKeara Leibovitz            [
434*736ac814SKeara Leibovitz                "$TC actions flush action nat",
435*736ac814SKeara Leibovitz                0,
436*736ac814SKeara Leibovitz                1,
437*736ac814SKeara Leibovitz                255
438*736ac814SKeara Leibovitz            ]
439*736ac814SKeara Leibovitz        ],
440*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 jump 777",
441*736ac814SKeara Leibovitz        "expExitCode": "0",
442*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
443*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 jump 777",
444*736ac814SKeara Leibovitz        "matchCount": "1",
445*736ac814SKeara Leibovitz        "teardown": [
446*736ac814SKeara Leibovitz            "$TC actions flush action nat"
447*736ac814SKeara Leibovitz        ]
448*736ac814SKeara Leibovitz    },
449*736ac814SKeara Leibovitz    {
450*736ac814SKeara Leibovitz        "id": "d9fc",
451*736ac814SKeara Leibovitz        "name": "Add nat action on egress with drop control action",
452*736ac814SKeara Leibovitz        "category": [
453*736ac814SKeara Leibovitz            "actions",
454*736ac814SKeara Leibovitz            "nat"
455*736ac814SKeara Leibovitz        ],
456*736ac814SKeara Leibovitz        "setup": [
457*736ac814SKeara Leibovitz            [
458*736ac814SKeara Leibovitz                "$TC actions flush action nat",
459*736ac814SKeara Leibovitz                0,
460*736ac814SKeara Leibovitz                1,
461*736ac814SKeara Leibovitz                255
462*736ac814SKeara Leibovitz            ]
463*736ac814SKeara Leibovitz        ],
464*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 drop",
465*736ac814SKeara Leibovitz        "expExitCode": "0",
466*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
467*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 drop",
468*736ac814SKeara Leibovitz        "matchCount": "1",
469*736ac814SKeara Leibovitz        "teardown": [
470*736ac814SKeara Leibovitz            "$TC actions flush action nat"
471*736ac814SKeara Leibovitz        ]
472*736ac814SKeara Leibovitz    },
473*736ac814SKeara Leibovitz    {
474*736ac814SKeara Leibovitz        "id": "a895",
475*736ac814SKeara Leibovitz        "name": "Add nat action on egress with DEFAULT IP address",
476*736ac814SKeara Leibovitz        "category": [
477*736ac814SKeara Leibovitz            "actions",
478*736ac814SKeara Leibovitz            "nat"
479*736ac814SKeara Leibovitz        ],
480*736ac814SKeara Leibovitz        "setup": [
481*736ac814SKeara Leibovitz            [
482*736ac814SKeara Leibovitz                "$TC actions flush action nat",
483*736ac814SKeara Leibovitz                0,
484*736ac814SKeara Leibovitz                1,
485*736ac814SKeara Leibovitz                255
486*736ac814SKeara Leibovitz            ]
487*736ac814SKeara Leibovitz        ],
488*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress default 20.20.20.1 pipe index 10",
489*736ac814SKeara Leibovitz        "expExitCode": "0",
490*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 10",
491*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
492*736ac814SKeara Leibovitz        "matchCount": "1",
493*736ac814SKeara Leibovitz        "teardown": [
494*736ac814SKeara Leibovitz            "$TC actions flush action nat"
495*736ac814SKeara Leibovitz        ]
496*736ac814SKeara Leibovitz    },
497*736ac814SKeara Leibovitz    {
498*736ac814SKeara Leibovitz        "id": "2572",
499*736ac814SKeara Leibovitz        "name": "Add nat action on egress with ANY IP address",
500*736ac814SKeara Leibovitz        "category": [
501*736ac814SKeara Leibovitz            "actions",
502*736ac814SKeara Leibovitz            "nat"
503*736ac814SKeara Leibovitz        ],
504*736ac814SKeara Leibovitz        "setup": [
505*736ac814SKeara Leibovitz            [
506*736ac814SKeara Leibovitz                "$TC actions flush action nat",
507*736ac814SKeara Leibovitz                0,
508*736ac814SKeara Leibovitz                1,
509*736ac814SKeara Leibovitz                255
510*736ac814SKeara Leibovitz            ]
511*736ac814SKeara Leibovitz        ],
512*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress any 20.20.20.1 pipe index 10",
513*736ac814SKeara Leibovitz        "expExitCode": "0",
514*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 10",
515*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
516*736ac814SKeara Leibovitz        "matchCount": "1",
517*736ac814SKeara Leibovitz        "teardown": [
518*736ac814SKeara Leibovitz            "$TC actions flush action nat"
519*736ac814SKeara Leibovitz        ]
520*736ac814SKeara Leibovitz    },
521*736ac814SKeara Leibovitz    {
522*736ac814SKeara Leibovitz        "id": "37f3",
523*736ac814SKeara Leibovitz        "name": "Add nat action on egress with ALL IP address",
524*736ac814SKeara Leibovitz        "category": [
525*736ac814SKeara Leibovitz            "actions",
526*736ac814SKeara Leibovitz            "nat"
527*736ac814SKeara Leibovitz        ],
528*736ac814SKeara Leibovitz        "setup": [
529*736ac814SKeara Leibovitz            [
530*736ac814SKeara Leibovitz                "$TC actions flush action nat",
531*736ac814SKeara Leibovitz                0,
532*736ac814SKeara Leibovitz                1,
533*736ac814SKeara Leibovitz                255
534*736ac814SKeara Leibovitz            ]
535*736ac814SKeara Leibovitz        ],
536*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10",
537*736ac814SKeara Leibovitz        "expExitCode": "0",
538*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 10",
539*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
540*736ac814SKeara Leibovitz        "matchCount": "1",
541*736ac814SKeara Leibovitz        "teardown": [
542*736ac814SKeara Leibovitz            "$TC actions flush action nat"
543*736ac814SKeara Leibovitz        ]
544*736ac814SKeara Leibovitz    },
545*736ac814SKeara Leibovitz    {
546*736ac814SKeara Leibovitz        "id": "6054",
547*736ac814SKeara Leibovitz        "name": "Add nat action on egress with cookie",
548*736ac814SKeara Leibovitz        "category": [
549*736ac814SKeara Leibovitz            "actions",
550*736ac814SKeara Leibovitz            "nat"
551*736ac814SKeara Leibovitz        ],
552*736ac814SKeara Leibovitz        "setup": [
553*736ac814SKeara Leibovitz            [
554*736ac814SKeara Leibovitz                "$TC actions flush action nat",
555*736ac814SKeara Leibovitz                0,
556*736ac814SKeara Leibovitz                1,
557*736ac814SKeara Leibovitz                255
558*736ac814SKeara Leibovitz            ]
559*736ac814SKeara Leibovitz        ],
560*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10 cookie aa1bc2d3eeff112233445566778800a1",
561*736ac814SKeara Leibovitz        "expExitCode": "0",
562*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 10",
563*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref.*cookie aa1bc2d3eeff112233445566778800a1",
564*736ac814SKeara Leibovitz        "matchCount": "1",
565*736ac814SKeara Leibovitz        "teardown": [
566*736ac814SKeara Leibovitz            "$TC actions flush action nat"
567*736ac814SKeara Leibovitz        ]
568*736ac814SKeara Leibovitz    },
569*736ac814SKeara Leibovitz    {
570*736ac814SKeara Leibovitz        "id": "79d6",
571*736ac814SKeara Leibovitz        "name": "Add nat action on ingress with cookie",
572*736ac814SKeara Leibovitz        "category": [
573*736ac814SKeara Leibovitz            "actions",
574*736ac814SKeara Leibovitz            "nat"
575*736ac814SKeara Leibovitz        ],
576*736ac814SKeara Leibovitz        "setup": [
577*736ac814SKeara Leibovitz            [
578*736ac814SKeara Leibovitz                "$TC actions flush action nat",
579*736ac814SKeara Leibovitz                0,
580*736ac814SKeara Leibovitz                1,
581*736ac814SKeara Leibovitz                255
582*736ac814SKeara Leibovitz            ]
583*736ac814SKeara Leibovitz        ],
584*736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 10.10.10.1 reclassify index 1 cookie 112233445566778899aabbccddeeff11",
585*736ac814SKeara Leibovitz        "expExitCode": "0",
586*736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 1",
587*736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 192.168.1.1/32 10.10.10.1 reclassify.*index 1 ref.*cookie 112233445566778899aabbccddeeff11",
588*736ac814SKeara Leibovitz        "matchCount": "1",
589*736ac814SKeara Leibovitz        "teardown": [
590*736ac814SKeara Leibovitz            "$TC actions flush action nat"
591*736ac814SKeara Leibovitz        ]
592*736ac814SKeara Leibovitz    }
593*736ac814SKeara Leibovitz]
594