NACK: [SRU][J/N][PATCH 0/2] Set rp_filter to 0 during kselftest/net/pmtu.sh test

Ian Whitfield ian.whitfield at canonical.com
Thu Oct 8 14:56:16 UTC 2026


Thanks for reviewing! I'll be submitting a v2 for this whole set via 
forgejo.

On 10/1/26 4:39 PM, Ian Whitfield wrote:
> BugLink: https://bugs.launchpad.net/bugs/2055473
>
> [Impact]
>
> During ubuntu_kselftests_net/net:pmtu.sh on 5.15 and 6.8 kernels, if the network
> interface in use has rp_filter=1, 4 test cases fail unexpectedly:
>
> # TEST: ICMPv4 with DSCP and ECN: PMTU exceptions [FAIL]
> # PMTU exception wasn't created after exceeding MTU
> # TEST: ICMPv4 with DSCP and ECN: PMTU exceptions - nexthop objects [FAIL]
> # PMTU exception wasn't created after exceeding MTU
> # TEST: UDPv4 with DSCP and ECN: PMTU exceptions [FAIL]
> # PMTU exception wasn't created after exceeding MTU
> # TEST: UDPv4 with DSCP and ECN: PMTU exceptions - nexthop objects [FAIL]
> # PMTU exception wasn't created after exceeding MTU
>
> This happens because the exception is being filtered by the strict rp_filter
> setting, so the test believes one was not received. Because this is dependent
> on the test environment's configuration, this failure would only happen on some
> clouds, particularly GCE. Clouds which set rp_filter=2 (loose) are not affected.
>
> This issue was fixed upstream by always disabling rp_filter during the test,
> to improve consistency. With this upstream fix, 7.0 kernels are unaffected.
> The affected tests were added after 5.4 so kernels earlier than 5.15 are also
> unaffected.
>
> [Fix]
>
> Backport the fix commit:
> ce17831f8e970 ("selftests: net: disable rp_filter after namespace initialization")
> to 5.15 and 6.8, as well as any needed dependencies.
>
> Backport notes in the commits should explain any conflict resolutions, but I
> should particularly note that in jammy, net/lib.sh was added in our backport of
> d83a580675927 ("selftests: net: use slowwait to stabilize vrf_route_leaking test")
> by including some parts of
> 25ae948b44788 ("selftests/net: add lib.sh")
> which we then finish backporting in this patchset.
>
> [Test plan]
>
> Ran the pmtu.sh ubuntu_kselftests_net test through autotest on jammy and noble,
> then applied the patchsets to the kernel source and reran the tests. The failure
> is resolved after applying. For jammy I also ran unicast_extensions.sh because
> it was also touched during the backport.
>
> [Where problems could occur]
>
> All changes are within the selftests code, so problems should only show up as
> invalid test results after applying the fix.
>
> Hangbin Liu (5):
>    selftests/net: add lib.sh
>    selftests/net: add variable NS_LIST for lib.sh
>    selftests/net: convert pmtu.sh to run it in unique namespace
>    selftests: net: disable rp_filter after namespace initialization
>    selftests/net: convert unicast_extensions.sh to run it in unique
>      namespace
>
> Yujie Liu (1):
>    selftests/net: change shebang to bash to support "source"
>
>   tools/testing/selftests/net/Makefile          |   2 +-
>   tools/testing/selftests/net/forwarding/lib.sh |  27 +----
>   tools/testing/selftests/net/lib.sh            |  69 ++++++++++++
>   tools/testing/selftests/net/pmtu.sh           |  29 ++---
>   .../selftests/net/unicast_extensions.sh       | 101 ++++++++----------
>   5 files changed, 128 insertions(+), 100 deletions(-)
>



More information about the kernel-team mailing list