Re: [PATCH net-next v3] selftests: net: add IPv4 and IPv6 address order check
From: Fernando Fernandez Mancera <hidden>
Date: 2026-09-17 11:03:08
On 9/14/26 8:58 AM, Martin Jabůrek wrote:
Introduce the following new tests: `ipv4_verify_same_scope_addr_order`, `ipv4_verify_inter_scope_addr_order`, `ipv6_verify_same_scope_addr_order`, `ipv6_verify_inter_scope_addr_order` to check the ordering of a set of IP addresses after being inserted. The implementations of these protocols are inconsistent in regard to address ordering. IPv4 addresses stay in the same order as inserted while IPv6 addresses appear in reverse order. This inconsistency has prompted attempts to unify the ordering, so both protocols act the same (as IPv4). This however caused user-space regressions in certain applications, which relied on the order as it was prior to the change (particularly NetworkManager). A similar inconsistency occurs when inserting different scope addresses, where IPv4 puts link local ones before global and IPv6 does the opposite. Attempts were already made to unify this also, risking further regressions. The addition of these tests aims to consolidate current behaviour to prevent regressions in the future. The expected behaviour is the initial one, where each protocol acts differently. The same goes for inter scope addresses. Conversations detailing the decision processes for creating these tests are linked below. Link: https://lore.kernel.org/netdev/20260521135310.GC977@cmadams.net/ (local) Link: https://lore.kernel.org/netdev/20260529112357.5079-1-fmancera@suse.de/ (local) Link: https://lore.kernel.org/netdev/20260721090114.GA2510713@shredder/ (local) Suggested-by: Fernando Fernandez Mancera <redacted> Signed-off-by: Martin Jabůrek <redacted>
The comments are a bit verbose IMHO but given that this already caused confusion it is likely to have it well documented on the tests. Reviewed-by: Fernando Fernandez Mancera <redacted>