xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/nat.json (revision 1e45d043a8bb2ed8a541384db3cc133e92001f0c)
1736ac814SKeara Leibovitz[
2736ac814SKeara Leibovitz    {
3736ac814SKeara Leibovitz        "id": "7565",
4736ac814SKeara Leibovitz        "name": "Add nat action on ingress with default control action",
5736ac814SKeara Leibovitz        "category": [
6736ac814SKeara Leibovitz            "actions",
7736ac814SKeara Leibovitz            "nat"
8736ac814SKeara Leibovitz        ],
9736ac814SKeara Leibovitz        "setup": [
10736ac814SKeara Leibovitz            [
11736ac814SKeara Leibovitz                "$TC actions flush action nat",
12736ac814SKeara Leibovitz                0,
13736ac814SKeara Leibovitz                1,
14736ac814SKeara Leibovitz                255
15736ac814SKeara Leibovitz            ]
16736ac814SKeara Leibovitz        ],
17736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 200.200.200.1",
18736ac814SKeara Leibovitz        "expExitCode": "0",
19736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
20736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 192.168.1.1/32 200.200.200.1 pass",
21736ac814SKeara Leibovitz        "matchCount": "1",
22736ac814SKeara Leibovitz        "teardown": [
23736ac814SKeara Leibovitz            "$TC actions flush action nat"
24736ac814SKeara Leibovitz        ]
25736ac814SKeara Leibovitz    },
26736ac814SKeara Leibovitz    {
27736ac814SKeara Leibovitz        "id": "fd79",
28736ac814SKeara Leibovitz        "name": "Add nat action on ingress with pipe control action",
29736ac814SKeara Leibovitz        "category": [
30736ac814SKeara Leibovitz            "actions",
31736ac814SKeara Leibovitz            "nat"
32736ac814SKeara Leibovitz        ],
33736ac814SKeara Leibovitz        "setup": [
34736ac814SKeara Leibovitz            [
35736ac814SKeara Leibovitz                "$TC actions flush action nat",
36736ac814SKeara Leibovitz                0,
37736ac814SKeara Leibovitz                1,
38736ac814SKeara Leibovitz                255
39736ac814SKeara Leibovitz            ]
40736ac814SKeara Leibovitz        ],
41736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 2.2.2.1 pipe index 77",
42736ac814SKeara Leibovitz        "expExitCode": "0",
43736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 77",
44736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 2.2.2.1 pipe.*index 77 ref",
45736ac814SKeara Leibovitz        "matchCount": "1",
46736ac814SKeara Leibovitz        "teardown": [
47736ac814SKeara Leibovitz            "$TC actions flush action nat"
48736ac814SKeara Leibovitz        ]
49736ac814SKeara Leibovitz    },
50736ac814SKeara Leibovitz    {
51736ac814SKeara Leibovitz        "id": "eab9",
52736ac814SKeara Leibovitz        "name": "Add nat action on ingress with continue control action",
53736ac814SKeara Leibovitz        "category": [
54736ac814SKeara Leibovitz            "actions",
55736ac814SKeara Leibovitz            "nat"
56736ac814SKeara Leibovitz        ],
57736ac814SKeara Leibovitz        "setup": [
58736ac814SKeara Leibovitz            [
59736ac814SKeara Leibovitz                "$TC actions flush action nat",
60736ac814SKeara Leibovitz                0,
61736ac814SKeara Leibovitz                1,
62736ac814SKeara Leibovitz                255
63736ac814SKeara Leibovitz            ]
64736ac814SKeara Leibovitz        ],
65736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 continue index 1000",
66736ac814SKeara Leibovitz        "expExitCode": "0",
67736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 1000",
68736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 192.168.10.10/32 192.168.20.20 continue.*index 1000 ref",
69736ac814SKeara Leibovitz        "matchCount": "1",
70736ac814SKeara Leibovitz        "teardown": [
71736ac814SKeara Leibovitz            "$TC actions flush action nat"
72736ac814SKeara Leibovitz        ]
73736ac814SKeara Leibovitz    },
74736ac814SKeara Leibovitz    {
75736ac814SKeara Leibovitz        "id": "c53a",
76736ac814SKeara Leibovitz        "name": "Add nat action on ingress with reclassify control action",
77736ac814SKeara Leibovitz        "category": [
78736ac814SKeara Leibovitz            "actions",
79736ac814SKeara Leibovitz            "nat"
80736ac814SKeara Leibovitz        ],
81736ac814SKeara Leibovitz        "setup": [
82736ac814SKeara Leibovitz            [
83736ac814SKeara Leibovitz                "$TC actions flush action nat",
84736ac814SKeara Leibovitz                0,
85736ac814SKeara Leibovitz                1,
86736ac814SKeara Leibovitz                255
87736ac814SKeara Leibovitz            ]
88736ac814SKeara Leibovitz        ],
89736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 192.168.10.10 192.168.20.20 reclassify index 1000",
90736ac814SKeara Leibovitz        "expExitCode": "0",
91736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 1000",
92736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 192.168.10.10/32 192.168.20.20 reclassify.*index 1000 ref",
93736ac814SKeara Leibovitz        "matchCount": "1",
94736ac814SKeara Leibovitz        "teardown": [
95736ac814SKeara Leibovitz            "$TC actions flush action nat"
96736ac814SKeara Leibovitz        ]
97736ac814SKeara Leibovitz    },
98736ac814SKeara Leibovitz    {
99736ac814SKeara Leibovitz        "id": "76c9",
100736ac814SKeara Leibovitz        "name": "Add nat action on ingress with jump control action",
101736ac814SKeara Leibovitz        "category": [
102736ac814SKeara Leibovitz            "actions",
103736ac814SKeara Leibovitz            "nat"
104736ac814SKeara Leibovitz        ],
105736ac814SKeara Leibovitz        "setup": [
106736ac814SKeara Leibovitz            [
107736ac814SKeara Leibovitz                "$TC actions flush action nat",
108736ac814SKeara Leibovitz                0,
109736ac814SKeara Leibovitz                1,
110736ac814SKeara Leibovitz                255
111736ac814SKeara Leibovitz            ]
112736ac814SKeara Leibovitz        ],
113736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 12.18.10.10 12.18.20.20 jump 10 index 22",
114736ac814SKeara Leibovitz        "expExitCode": "0",
115736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 22",
116736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 12.18.10.10/32 12.18.20.20 jump 10.*index 22 ref",
117736ac814SKeara Leibovitz        "matchCount": "1",
118736ac814SKeara Leibovitz        "teardown": [
119736ac814SKeara Leibovitz            "$TC actions flush action nat"
120736ac814SKeara Leibovitz        ]
121736ac814SKeara Leibovitz    },
122736ac814SKeara Leibovitz    {
123736ac814SKeara Leibovitz        "id": "24c6",
124736ac814SKeara Leibovitz        "name": "Add nat action on ingress with drop control action",
125736ac814SKeara Leibovitz        "category": [
126736ac814SKeara Leibovitz            "actions",
127736ac814SKeara Leibovitz            "nat"
128736ac814SKeara Leibovitz        ],
129736ac814SKeara Leibovitz        "setup": [
130736ac814SKeara Leibovitz            [
131736ac814SKeara Leibovitz                "$TC actions flush action nat",
132736ac814SKeara Leibovitz                0,
133736ac814SKeara Leibovitz                1,
134736ac814SKeara Leibovitz                255
135736ac814SKeara Leibovitz            ]
136736ac814SKeara Leibovitz        ],
137736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 722",
138736ac814SKeara Leibovitz        "expExitCode": "0",
139736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 722",
140736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 drop.*index 722 ref",
141736ac814SKeara Leibovitz        "matchCount": "1",
142736ac814SKeara Leibovitz        "teardown": [
143736ac814SKeara Leibovitz            "$TC actions flush action nat"
144736ac814SKeara Leibovitz        ]
145736ac814SKeara Leibovitz    },
146736ac814SKeara Leibovitz    {
147736ac814SKeara Leibovitz        "id": "2120",
148736ac814SKeara Leibovitz        "name": "Add nat action on ingress with maximum index value",
149736ac814SKeara Leibovitz        "category": [
150736ac814SKeara Leibovitz            "actions",
151736ac814SKeara Leibovitz            "nat"
152736ac814SKeara Leibovitz        ],
153736ac814SKeara Leibovitz        "setup": [
154736ac814SKeara Leibovitz            [
155736ac814SKeara Leibovitz                "$TC actions flush action nat",
156736ac814SKeara Leibovitz                0,
157736ac814SKeara Leibovitz                1,
158736ac814SKeara Leibovitz                255
159736ac814SKeara Leibovitz            ]
160736ac814SKeara Leibovitz        ],
161736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295",
162736ac814SKeara Leibovitz        "expExitCode": "0",
163736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 4294967295",
164736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295 ref",
165736ac814SKeara Leibovitz        "matchCount": "1",
166736ac814SKeara Leibovitz        "teardown": [
167736ac814SKeara Leibovitz            "$TC actions flush action nat"
168736ac814SKeara Leibovitz        ]
169736ac814SKeara Leibovitz    },
170736ac814SKeara Leibovitz    {
171736ac814SKeara Leibovitz        "id": "3e9d",
172736ac814SKeara Leibovitz        "name": "Add nat action on ingress with invalid index value",
173736ac814SKeara Leibovitz        "category": [
174736ac814SKeara Leibovitz            "actions",
175736ac814SKeara Leibovitz            "nat"
176736ac814SKeara Leibovitz        ],
177736ac814SKeara Leibovitz        "setup": [
178736ac814SKeara Leibovitz            [
179736ac814SKeara Leibovitz                "$TC actions flush action nat",
180736ac814SKeara Leibovitz                0,
181736ac814SKeara Leibovitz                1,
182736ac814SKeara Leibovitz                255
183736ac814SKeara Leibovitz            ]
184736ac814SKeara Leibovitz        ],
185736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 index 4294967295555",
186736ac814SKeara Leibovitz        "expExitCode": "255",
187736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 4294967295555",
188736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 pass.*index 4294967295555 ref",
189736ac814SKeara Leibovitz        "matchCount": "0",
190736ac814SKeara Leibovitz        "teardown": [
191736ac814SKeara Leibovitz            [
192736ac814SKeara Leibovitz                "$TC actions flush action nat",
193736ac814SKeara Leibovitz                0,
194736ac814SKeara Leibovitz                1,
195736ac814SKeara Leibovitz                255
196736ac814SKeara Leibovitz            ]
197736ac814SKeara Leibovitz        ]
198736ac814SKeara Leibovitz    },
199736ac814SKeara Leibovitz    {
200736ac814SKeara Leibovitz        "id": "f6c9",
201736ac814SKeara Leibovitz        "name": "Add nat action on ingress with invalid IP address",
202736ac814SKeara Leibovitz        "category": [
203736ac814SKeara Leibovitz            "actions",
204736ac814SKeara Leibovitz            "nat"
205736ac814SKeara Leibovitz        ],
206736ac814SKeara Leibovitz        "setup": [
207736ac814SKeara Leibovitz            [
208736ac814SKeara Leibovitz                "$TC actions flush action nat",
209736ac814SKeara Leibovitz                0,
210736ac814SKeara Leibovitz                1,
211736ac814SKeara Leibovitz                255
212736ac814SKeara Leibovitz            ]
213736ac814SKeara Leibovitz        ],
214736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.1888.2.2 index 7",
215736ac814SKeara Leibovitz        "expExitCode": "255",
216736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 7",
217736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 1.1888.2.2 pass.*index 7 ref",
218736ac814SKeara Leibovitz        "matchCount": "0",
219736ac814SKeara Leibovitz        "teardown": [
220736ac814SKeara Leibovitz            [
221736ac814SKeara Leibovitz                "$TC actions flush action nat",
222736ac814SKeara Leibovitz                0,
223736ac814SKeara Leibovitz                1,
224736ac814SKeara Leibovitz                255
225736ac814SKeara Leibovitz            ]
226736ac814SKeara Leibovitz        ]
227736ac814SKeara Leibovitz    },
228736ac814SKeara Leibovitz    {
229736ac814SKeara Leibovitz        "id": "be25",
230736ac814SKeara Leibovitz        "name": "Add nat action on ingress with invalid argument",
231736ac814SKeara Leibovitz        "category": [
232736ac814SKeara Leibovitz            "actions",
233736ac814SKeara Leibovitz            "nat"
234736ac814SKeara Leibovitz        ],
235736ac814SKeara Leibovitz        "setup": [
236736ac814SKeara Leibovitz            [
237736ac814SKeara Leibovitz                "$TC actions flush action nat",
238736ac814SKeara Leibovitz                0,
239736ac814SKeara Leibovitz                1,
240736ac814SKeara Leibovitz                255
241736ac814SKeara Leibovitz            ]
242736ac814SKeara Leibovitz        ],
243736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 1.1.1.1 1.18.2.2 another_arg index 12",
244736ac814SKeara Leibovitz        "expExitCode": "255",
245736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 12",
246736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 1.1.1.1/32 1.18.2.2 pass.*another_arg.*index 12 ref",
247736ac814SKeara Leibovitz        "matchCount": "0",
248736ac814SKeara Leibovitz        "teardown": [
249736ac814SKeara Leibovitz            [
250736ac814SKeara Leibovitz                "$TC actions flush action nat",
251736ac814SKeara Leibovitz                0,
252736ac814SKeara Leibovitz                1,
253736ac814SKeara Leibovitz                255
254736ac814SKeara Leibovitz            ]
255736ac814SKeara Leibovitz        ]
256736ac814SKeara Leibovitz    },
257736ac814SKeara Leibovitz    {
258736ac814SKeara Leibovitz        "id": "a7bd",
259736ac814SKeara Leibovitz        "name": "Add nat action on ingress with DEFAULT IP address",
260736ac814SKeara Leibovitz        "category": [
261736ac814SKeara Leibovitz            "actions",
262736ac814SKeara Leibovitz            "nat"
263736ac814SKeara Leibovitz        ],
264736ac814SKeara Leibovitz        "setup": [
265736ac814SKeara Leibovitz            [
266736ac814SKeara Leibovitz                "$TC actions flush action nat",
267736ac814SKeara Leibovitz                0,
268736ac814SKeara Leibovitz                1,
269736ac814SKeara Leibovitz                255
270736ac814SKeara Leibovitz            ]
271736ac814SKeara Leibovitz        ],
272736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress default 10.10.10.1 index 12",
273736ac814SKeara Leibovitz        "expExitCode": "0",
274736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 12",
275736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
276736ac814SKeara Leibovitz        "matchCount": "1",
277736ac814SKeara Leibovitz        "teardown": [
278736ac814SKeara Leibovitz            "$TC actions flush action nat"
279736ac814SKeara Leibovitz        ]
280736ac814SKeara Leibovitz    },
281736ac814SKeara Leibovitz    {
282736ac814SKeara Leibovitz        "id": "ee1e",
283736ac814SKeara Leibovitz        "name": "Add nat action on ingress with ANY IP address",
284736ac814SKeara Leibovitz        "category": [
285736ac814SKeara Leibovitz            "actions",
286736ac814SKeara Leibovitz            "nat"
287736ac814SKeara Leibovitz        ],
288736ac814SKeara Leibovitz        "setup": [
289736ac814SKeara Leibovitz            [
290736ac814SKeara Leibovitz                "$TC actions flush action nat",
291736ac814SKeara Leibovitz                0,
292736ac814SKeara Leibovitz                1,
293736ac814SKeara Leibovitz                255
294736ac814SKeara Leibovitz            ]
295736ac814SKeara Leibovitz        ],
296736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress any 10.10.10.1 index 12",
297736ac814SKeara Leibovitz        "expExitCode": "0",
298736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 12",
299736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
300736ac814SKeara Leibovitz        "matchCount": "1",
301736ac814SKeara Leibovitz        "teardown": [
302736ac814SKeara Leibovitz            "$TC actions flush action nat"
303736ac814SKeara Leibovitz        ]
304736ac814SKeara Leibovitz    },
305736ac814SKeara Leibovitz    {
306736ac814SKeara Leibovitz        "id": "1de8",
307736ac814SKeara Leibovitz        "name": "Add nat action on ingress with ALL IP address",
308736ac814SKeara Leibovitz        "category": [
309736ac814SKeara Leibovitz            "actions",
310736ac814SKeara Leibovitz            "nat"
311736ac814SKeara Leibovitz        ],
312736ac814SKeara Leibovitz        "setup": [
313736ac814SKeara Leibovitz            [
314736ac814SKeara Leibovitz                "$TC actions flush action nat",
315736ac814SKeara Leibovitz                0,
316736ac814SKeara Leibovitz                1,
317736ac814SKeara Leibovitz                255
318736ac814SKeara Leibovitz            ]
319736ac814SKeara Leibovitz        ],
320736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress all 10.10.10.1 index 12",
321736ac814SKeara Leibovitz        "expExitCode": "0",
322736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 12",
323736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 0.0.0.0/32 10.10.10.1 pass.*index 12 ref",
324736ac814SKeara Leibovitz        "matchCount": "1",
325736ac814SKeara Leibovitz        "teardown": [
326736ac814SKeara Leibovitz            "$TC actions flush action nat"
327736ac814SKeara Leibovitz        ]
328736ac814SKeara Leibovitz    },
329736ac814SKeara Leibovitz    {
330736ac814SKeara Leibovitz        "id": "8dba",
331736ac814SKeara Leibovitz        "name": "Add nat action on egress with default control action",
332736ac814SKeara Leibovitz        "category": [
333736ac814SKeara Leibovitz            "actions",
334736ac814SKeara Leibovitz            "nat"
335736ac814SKeara Leibovitz        ],
336736ac814SKeara Leibovitz        "setup": [
337736ac814SKeara Leibovitz            [
338736ac814SKeara Leibovitz                "$TC actions flush action nat",
339736ac814SKeara Leibovitz                0,
340736ac814SKeara Leibovitz                1,
341736ac814SKeara Leibovitz                255
342736ac814SKeara Leibovitz            ]
343736ac814SKeara Leibovitz        ],
344736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1",
345736ac814SKeara Leibovitz        "expExitCode": "0",
346736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
347736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 pass",
348736ac814SKeara Leibovitz        "matchCount": "1",
349736ac814SKeara Leibovitz        "teardown": [
350736ac814SKeara Leibovitz            "$TC actions flush action nat"
351736ac814SKeara Leibovitz        ]
352736ac814SKeara Leibovitz    },
353736ac814SKeara Leibovitz    {
354736ac814SKeara Leibovitz        "id": "19a7",
355736ac814SKeara Leibovitz        "name": "Add nat action on egress with pipe control action",
356736ac814SKeara Leibovitz        "category": [
357736ac814SKeara Leibovitz            "actions",
358736ac814SKeara Leibovitz            "nat"
359736ac814SKeara Leibovitz        ],
360736ac814SKeara Leibovitz        "setup": [
361736ac814SKeara Leibovitz            [
362736ac814SKeara Leibovitz                "$TC actions flush action nat",
363736ac814SKeara Leibovitz                0,
364736ac814SKeara Leibovitz                1,
365736ac814SKeara Leibovitz                255
366736ac814SKeara Leibovitz            ]
367736ac814SKeara Leibovitz        ],
368736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 pipe",
369736ac814SKeara Leibovitz        "expExitCode": "0",
370736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
371736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 pipe",
372736ac814SKeara Leibovitz        "matchCount": "1",
373736ac814SKeara Leibovitz        "teardown": [
374736ac814SKeara Leibovitz            "$TC actions flush action nat"
375736ac814SKeara Leibovitz        ]
376736ac814SKeara Leibovitz    },
377736ac814SKeara Leibovitz    {
378736ac814SKeara Leibovitz        "id": "f1d9",
379736ac814SKeara Leibovitz        "name": "Add nat action on egress with continue control action",
380736ac814SKeara Leibovitz        "category": [
381736ac814SKeara Leibovitz            "actions",
382736ac814SKeara Leibovitz            "nat"
383736ac814SKeara Leibovitz        ],
384736ac814SKeara Leibovitz        "setup": [
385736ac814SKeara Leibovitz            [
386736ac814SKeara Leibovitz                "$TC actions flush action nat",
387736ac814SKeara Leibovitz                0,
388736ac814SKeara Leibovitz                1,
389736ac814SKeara Leibovitz                255
390736ac814SKeara Leibovitz            ]
391736ac814SKeara Leibovitz        ],
392736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 continue",
393736ac814SKeara Leibovitz        "expExitCode": "0",
394736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
395736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 continue",
396736ac814SKeara Leibovitz        "matchCount": "1",
397736ac814SKeara Leibovitz        "teardown": [
398736ac814SKeara Leibovitz            "$TC actions flush action nat"
399736ac814SKeara Leibovitz        ]
400736ac814SKeara Leibovitz    },
401736ac814SKeara Leibovitz    {
402736ac814SKeara Leibovitz        "id": "6d4a",
403736ac814SKeara Leibovitz        "name": "Add nat action on egress with reclassify control action",
404736ac814SKeara Leibovitz        "category": [
405736ac814SKeara Leibovitz            "actions",
406736ac814SKeara Leibovitz            "nat"
407736ac814SKeara Leibovitz        ],
408736ac814SKeara Leibovitz        "setup": [
409736ac814SKeara Leibovitz            [
410736ac814SKeara Leibovitz                "$TC actions flush action nat",
411736ac814SKeara Leibovitz                0,
412736ac814SKeara Leibovitz                1,
413736ac814SKeara Leibovitz                255
414736ac814SKeara Leibovitz            ]
415736ac814SKeara Leibovitz        ],
416736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 reclassify",
417736ac814SKeara Leibovitz        "expExitCode": "0",
418736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
419736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 reclassify",
420736ac814SKeara Leibovitz        "matchCount": "1",
421736ac814SKeara Leibovitz        "teardown": [
422736ac814SKeara Leibovitz            "$TC actions flush action nat"
423736ac814SKeara Leibovitz        ]
424736ac814SKeara Leibovitz    },
425736ac814SKeara Leibovitz    {
426736ac814SKeara Leibovitz        "id": "b313",
427736ac814SKeara Leibovitz        "name": "Add nat action on egress with jump control action",
428736ac814SKeara Leibovitz        "category": [
429736ac814SKeara Leibovitz            "actions",
430736ac814SKeara Leibovitz            "nat"
431736ac814SKeara Leibovitz        ],
432736ac814SKeara Leibovitz        "setup": [
433736ac814SKeara Leibovitz            [
434736ac814SKeara Leibovitz                "$TC actions flush action nat",
435736ac814SKeara Leibovitz                0,
436736ac814SKeara Leibovitz                1,
437736ac814SKeara Leibovitz                255
438736ac814SKeara Leibovitz            ]
439736ac814SKeara Leibovitz        ],
440736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 jump 777",
441736ac814SKeara Leibovitz        "expExitCode": "0",
442736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
443736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 jump 777",
444736ac814SKeara Leibovitz        "matchCount": "1",
445736ac814SKeara Leibovitz        "teardown": [
446736ac814SKeara Leibovitz            "$TC actions flush action nat"
447736ac814SKeara Leibovitz        ]
448736ac814SKeara Leibovitz    },
449736ac814SKeara Leibovitz    {
450736ac814SKeara Leibovitz        "id": "d9fc",
451736ac814SKeara Leibovitz        "name": "Add nat action on egress with drop control action",
452736ac814SKeara Leibovitz        "category": [
453736ac814SKeara Leibovitz            "actions",
454736ac814SKeara Leibovitz            "nat"
455736ac814SKeara Leibovitz        ],
456736ac814SKeara Leibovitz        "setup": [
457736ac814SKeara Leibovitz            [
458736ac814SKeara Leibovitz                "$TC actions flush action nat",
459736ac814SKeara Leibovitz                0,
460736ac814SKeara Leibovitz                1,
461736ac814SKeara Leibovitz                255
462736ac814SKeara Leibovitz            ]
463736ac814SKeara Leibovitz        ],
464736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress 10.10.10.1 20.20.20.1 drop",
465736ac814SKeara Leibovitz        "expExitCode": "0",
466736ac814SKeara Leibovitz        "verifyCmd": "$TC actions ls action nat",
467736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 10.10.10.1/32 20.20.20.1 drop",
468736ac814SKeara Leibovitz        "matchCount": "1",
469736ac814SKeara Leibovitz        "teardown": [
470736ac814SKeara Leibovitz            "$TC actions flush action nat"
471736ac814SKeara Leibovitz        ]
472736ac814SKeara Leibovitz    },
473736ac814SKeara Leibovitz    {
474736ac814SKeara Leibovitz        "id": "a895",
475736ac814SKeara Leibovitz        "name": "Add nat action on egress with DEFAULT IP address",
476736ac814SKeara Leibovitz        "category": [
477736ac814SKeara Leibovitz            "actions",
478736ac814SKeara Leibovitz            "nat"
479736ac814SKeara Leibovitz        ],
480736ac814SKeara Leibovitz        "setup": [
481736ac814SKeara Leibovitz            [
482736ac814SKeara Leibovitz                "$TC actions flush action nat",
483736ac814SKeara Leibovitz                0,
484736ac814SKeara Leibovitz                1,
485736ac814SKeara Leibovitz                255
486736ac814SKeara Leibovitz            ]
487736ac814SKeara Leibovitz        ],
488736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress default 20.20.20.1 pipe index 10",
489736ac814SKeara Leibovitz        "expExitCode": "0",
490736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 10",
491736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
492736ac814SKeara Leibovitz        "matchCount": "1",
493736ac814SKeara Leibovitz        "teardown": [
494736ac814SKeara Leibovitz            "$TC actions flush action nat"
495736ac814SKeara Leibovitz        ]
496736ac814SKeara Leibovitz    },
497736ac814SKeara Leibovitz    {
498736ac814SKeara Leibovitz        "id": "2572",
499736ac814SKeara Leibovitz        "name": "Add nat action on egress with ANY IP address",
500736ac814SKeara Leibovitz        "category": [
501736ac814SKeara Leibovitz            "actions",
502736ac814SKeara Leibovitz            "nat"
503736ac814SKeara Leibovitz        ],
504736ac814SKeara Leibovitz        "setup": [
505736ac814SKeara Leibovitz            [
506736ac814SKeara Leibovitz                "$TC actions flush action nat",
507736ac814SKeara Leibovitz                0,
508736ac814SKeara Leibovitz                1,
509736ac814SKeara Leibovitz                255
510736ac814SKeara Leibovitz            ]
511736ac814SKeara Leibovitz        ],
512736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress any 20.20.20.1 pipe index 10",
513736ac814SKeara Leibovitz        "expExitCode": "0",
514736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 10",
515736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
516736ac814SKeara Leibovitz        "matchCount": "1",
517736ac814SKeara Leibovitz        "teardown": [
518736ac814SKeara Leibovitz            "$TC actions flush action nat"
519736ac814SKeara Leibovitz        ]
520736ac814SKeara Leibovitz    },
521736ac814SKeara Leibovitz    {
522736ac814SKeara Leibovitz        "id": "37f3",
523736ac814SKeara Leibovitz        "name": "Add nat action on egress with ALL IP address",
524736ac814SKeara Leibovitz        "category": [
525736ac814SKeara Leibovitz            "actions",
526736ac814SKeara Leibovitz            "nat"
527736ac814SKeara Leibovitz        ],
528736ac814SKeara Leibovitz        "setup": [
529736ac814SKeara Leibovitz            [
530736ac814SKeara Leibovitz                "$TC actions flush action nat",
531736ac814SKeara Leibovitz                0,
532736ac814SKeara Leibovitz                1,
533736ac814SKeara Leibovitz                255
534736ac814SKeara Leibovitz            ]
535736ac814SKeara Leibovitz        ],
536736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10",
537736ac814SKeara Leibovitz        "expExitCode": "0",
538736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 10",
539736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref",
540736ac814SKeara Leibovitz        "matchCount": "1",
541736ac814SKeara Leibovitz        "teardown": [
542736ac814SKeara Leibovitz            "$TC actions flush action nat"
543736ac814SKeara Leibovitz        ]
544736ac814SKeara Leibovitz    },
545736ac814SKeara Leibovitz    {
546736ac814SKeara Leibovitz        "id": "6054",
547736ac814SKeara Leibovitz        "name": "Add nat action on egress with cookie",
548736ac814SKeara Leibovitz        "category": [
549736ac814SKeara Leibovitz            "actions",
550736ac814SKeara Leibovitz            "nat"
551736ac814SKeara Leibovitz        ],
552736ac814SKeara Leibovitz        "setup": [
553736ac814SKeara Leibovitz            [
554736ac814SKeara Leibovitz                "$TC actions flush action nat",
555736ac814SKeara Leibovitz                0,
556736ac814SKeara Leibovitz                1,
557736ac814SKeara Leibovitz                255
558736ac814SKeara Leibovitz            ]
559736ac814SKeara Leibovitz        ],
560736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10 cookie aa1bc2d3eeff112233445566778800a1",
561736ac814SKeara Leibovitz        "expExitCode": "0",
562736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 10",
563736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat egress 0.0.0.0/32 20.20.20.1 pipe.*index 10 ref.*cookie aa1bc2d3eeff112233445566778800a1",
564736ac814SKeara Leibovitz        "matchCount": "1",
565736ac814SKeara Leibovitz        "teardown": [
566736ac814SKeara Leibovitz            "$TC actions flush action nat"
567736ac814SKeara Leibovitz        ]
568736ac814SKeara Leibovitz    },
569736ac814SKeara Leibovitz    {
570736ac814SKeara Leibovitz        "id": "79d6",
571736ac814SKeara Leibovitz        "name": "Add nat action on ingress with cookie",
572736ac814SKeara Leibovitz        "category": [
573736ac814SKeara Leibovitz            "actions",
574736ac814SKeara Leibovitz            "nat"
575736ac814SKeara Leibovitz        ],
576736ac814SKeara Leibovitz        "setup": [
577736ac814SKeara Leibovitz            [
578736ac814SKeara Leibovitz                "$TC actions flush action nat",
579736ac814SKeara Leibovitz                0,
580736ac814SKeara Leibovitz                1,
581736ac814SKeara Leibovitz                255
582736ac814SKeara Leibovitz            ]
583736ac814SKeara Leibovitz        ],
584736ac814SKeara Leibovitz        "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 10.10.10.1 reclassify index 1 cookie 112233445566778899aabbccddeeff11",
585736ac814SKeara Leibovitz        "expExitCode": "0",
586736ac814SKeara Leibovitz        "verifyCmd": "$TC actions get action nat index 1",
587736ac814SKeara Leibovitz        "matchPattern": "action order [0-9]+:  nat ingress 192.168.1.1/32 10.10.10.1 reclassify.*index 1 ref.*cookie 112233445566778899aabbccddeeff11",
588736ac814SKeara Leibovitz        "matchCount": "1",
589736ac814SKeara Leibovitz        "teardown": [
590736ac814SKeara Leibovitz            "$TC actions flush action nat"
591736ac814SKeara Leibovitz        ]
592*1e45d043SDavide Caratti    },
593*1e45d043SDavide Caratti    {
594*1e45d043SDavide Caratti        "id": "4b12",
595*1e45d043SDavide Caratti        "name": "Replace nat action with invalid goto chain control",
596*1e45d043SDavide Caratti        "category": [
597*1e45d043SDavide Caratti            "actions",
598*1e45d043SDavide Caratti            "nat"
599*1e45d043SDavide Caratti        ],
600*1e45d043SDavide Caratti        "setup": [
601*1e45d043SDavide Caratti            [
602*1e45d043SDavide Caratti                "$TC actions flush action nat",
603*1e45d043SDavide Caratti                0,
604*1e45d043SDavide Caratti                1,
605*1e45d043SDavide Caratti                255
606*1e45d043SDavide Caratti            ],
607*1e45d043SDavide Caratti            "$TC actions add action nat ingress 1.18.1.1 1.18.2.2 drop index 90"
608*1e45d043SDavide Caratti        ],
609*1e45d043SDavide Caratti        "cmdUnderTest": "$TC actions replace action nat ingress 1.18.1.1 1.18.2.2 goto chain 42 index 90 cookie c1a0c1a0",
610*1e45d043SDavide Caratti        "expExitCode": "255",
611*1e45d043SDavide Caratti        "verifyCmd": "$TC actions get action nat index 90",
612*1e45d043SDavide Caratti        "matchPattern": "action order [0-9]+:  nat ingress 1.18.1.1/32 1.18.2.2 drop.*index 90 ref",
613*1e45d043SDavide Caratti        "matchCount": "1",
614*1e45d043SDavide Caratti        "teardown": [
615*1e45d043SDavide Caratti            "$TC actions flush action nat"
616*1e45d043SDavide Caratti        ]
617736ac814SKeara Leibovitz    }
618736ac814SKeara Leibovitz]
619