Subject: Re: [PATCH net v2] Revert "ipv6: preserve insertion order for same-scope addresses"

From: Matthieu Baerts <[email-masked]>
Date: Mon, 1 Jun 2026 12:03:59 +1000

Hi Stefano,

On 29/05/2026 21:41, Stefano Brivio wrote:
> On Fri, 29 May 2026 13:23:57 +0200
> Fernando Fernandez Mancera <[email-masked]> wrote:
> 
>> Chris Adams reported that preserving insertion order for same-scope
>> addresses is causing SSH connections to be dropped after stopping a VM
>> while running NetworkManager.
>>
>> NetworkManager caches the IPv6 address configuration, when a RA arrives,
>> it determines the list of addresses to configure and checks if the
>> addresses are already in the right order in the kernel. If they aren't,
>> NetworkManager removes and re-adds them to achieve the desired order.
>>
>> As the order changes, NetworkManager is confused and reconfigures the
>> addresses on every update. In addition, this would also affect to cloud
>> tooling that relies on IPv6 addresses order to identify primary and
>> secondaries addresses.
> 
> By the way, I'm still looking into this part, trying to find
> "problematic" examples.
> 
> And I couldn't find any, yet, because it looks like there's always a
> _single_ IPv6 address being used as a secondary for a primary IPv4
> address.

FYI, the order change also affected some specific scripts, e.g. here
with MPTCP and packetdrill:

  https://github.com/multipath-tcp/packetdrill/commit/1b7cd4482ce8

Because the order was not "natural" before, and different from IPv4, a
workaround was needed to keep the same order. I was happy to remove it,
but now it looks like I need to re-apply it :)

It would be nice to get the "natural" order back without breaking the
userspace (or with a way to choose the order).

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.