Skip to content

Commit ca9e5d3

Browse files
tammelakuba-moo
authored andcommitted
selftests: tc-testing: fix nat regex matching
In iproute 6.14, the nat ip mask logic was fixed to remove an undefined behaviour[1]. So now instead of reporting '0.0.0.0/32' on x86 and potentially '0.0.0.0/0' in other platforms, it reports '0.0.0.0/0' in all platforms. [1] https://lore.kernel.org/netdev/[email protected]/ Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Pedro Tammela <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9684407 commit ca9e5d3

File tree

1 file changed

+7
-7
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/actions

1 file changed

+7
-7
lines changed

tools/testing/selftests/tc-testing/tc-tests/actions/nat.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
"cmdUnderTest": "$TC actions add action nat ingress default 10.10.10.1 index 12",
306306
"expExitCode": "0",
307307
"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",
308+
"matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/0 10.10.10.1 pass.*index 12 ref",
309309
"matchCount": "1",
310310
"teardown": [
311311
"$TC actions flush action nat"
@@ -332,7 +332,7 @@
332332
"cmdUnderTest": "$TC actions add action nat ingress any 10.10.10.1 index 12",
333333
"expExitCode": "0",
334334
"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",
335+
"matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/0 10.10.10.1 pass.*index 12 ref",
336336
"matchCount": "1",
337337
"teardown": [
338338
"$TC actions flush action nat"
@@ -359,7 +359,7 @@
359359
"cmdUnderTest": "$TC actions add action nat ingress all 10.10.10.1 index 12",
360360
"expExitCode": "0",
361361
"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",
362+
"matchPattern": "action order [0-9]+: nat ingress 0.0.0.0/0 10.10.10.1 pass.*index 12 ref",
363363
"matchCount": "1",
364364
"teardown": [
365365
"$TC actions flush action nat"
@@ -548,7 +548,7 @@
548548
"cmdUnderTest": "$TC actions add action nat egress default 20.20.20.1 pipe index 10",
549549
"expExitCode": "0",
550550
"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",
551+
"matchPattern": "action order [0-9]+: nat egress 0.0.0.0/0 20.20.20.1 pipe.*index 10 ref",
552552
"matchCount": "1",
553553
"teardown": [
554554
"$TC actions flush action nat"
@@ -575,7 +575,7 @@
575575
"cmdUnderTest": "$TC actions add action nat egress any 20.20.20.1 pipe index 10",
576576
"expExitCode": "0",
577577
"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",
578+
"matchPattern": "action order [0-9]+: nat egress 0.0.0.0/0 20.20.20.1 pipe.*index 10 ref",
579579
"matchCount": "1",
580580
"teardown": [
581581
"$TC actions flush action nat"
@@ -602,7 +602,7 @@
602602
"cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10",
603603
"expExitCode": "0",
604604
"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",
605+
"matchPattern": "action order [0-9]+: nat egress 0.0.0.0/0 20.20.20.1 pipe.*index 10 ref",
606606
"matchCount": "1",
607607
"teardown": [
608608
"$TC actions flush action nat"
@@ -629,7 +629,7 @@
629629
"cmdUnderTest": "$TC actions add action nat egress all 20.20.20.1 pipe index 10 cookie aa1bc2d3eeff112233445566778800a1",
630630
"expExitCode": "0",
631631
"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",
632+
"matchPattern": "action order [0-9]+: nat egress 0.0.0.0/0 20.20.20.1 pipe.*index 10 ref.*cookie aa1bc2d3eeff112233445566778800a1",
633633
"matchCount": "1",
634634
"teardown": [
635635
"$TC actions flush action nat"

0 commit comments

Comments
 (0)