Re: Problem with IPv6 privacy addresses in 7.0

David Gibson <[email protected]>
Newsgroups dev.linux.lists.regressions,org.kernel.vger.netdev
Message-ID <ahkar8tE5M6u0_zZ@zatzit>
On Thu, May 28, 2026 at 05:17:11PM +0200, Stefano Brivio wrote:
> On Thu, 28 May 2026 16:34:02 +0200
> Andrew Lunn <[email protected]> wrote:
> 
> > > Actually, an eventually fixed version of NetworkManager doesn't need to
> > > know the behaviour of the kernel: it can just order addresses by
> > > timestamps instead, as Fernando mentioned.  
> > 
> > Can pasta also use this scheme to order the addresses? Is there a way
> > pasta can be independent of the order?
> 
> pasta itself doesn't even care, it just inserts (copies) addresses one
> by one as returned. The kernel cares, because it preferentially picks
> the first one, as stored, within a given scope.
> 
> The problem is that they are inserted in the opposite order than one
> would expect (that is, opposite to what's used by the kernel to select
> them, and opposite to what's done for IPv4).
> 
> This (with an older kernel version) is quite "funny" (pasta by default
> copies everything it finds to the inner namespace):

Fwiw, a hypothetical tool which copied network configuration from one
namespace to an independent one - or which saved network configuration
to restore it later - would likely hit the same issue.

> ---
> $ pasta -6 -Ix --no-ra
> # ip a a fd00::1 dev x
> # ip a a fd43::1 dev x
> # ip a a 2620::1 dev x
> # ip link set dev x up
> # ip a s x
> 2: x: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
>     link/ether 86:de:6b:53:5c:05 brd ff:ff:ff:ff:ff:ff
>     inet6 2620::1/128 scope global tentative 
>        valid_lft forever preferred_lft forever
>     inet6 fd43::1/128 scope global tentative 
>        valid_lft forever preferred_lft forever
>     inet6 fd00::1/128 scope global tentative 
>        valid_lft forever preferred_lft forever
> # pasta -6 --config-net --no-ra
> # ip a s x scope global
> 2: x: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc fq_codel state UNKNOWN group default qlen 1000
>     link/ether 32:d4:5b:f0:fd:50 brd ff:ff:ff:ff:ff:ff
>     inet6 fd00::1/128 scope global nodad 
>        valid_lft forever preferred_lft forever
>     inet6 fd43::1/128 scope global nodad 
>        valid_lft forever preferred_lft forever
>     inet6 2620::1/128 scope global nodad 
>        valid_lft forever preferred_lft forever
> # pasta -6 --config-net --no-ra
> # ip a s x scope global
> 2: x: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc fq_codel state UNKNOWN group default qlen 1000
>     link/ether 1a:ed:4a:27:f6:9f brd ff:ff:ff:ff:ff:ff
>     inet6 2620::1/128 scope global nodad 
>        valid_lft forever preferred_lft forever
>     inet6 fd43::1/128 scope global nodad 
>        valid_lft forever preferred_lft forever
>     inet6 fd00::1/128 scope global nodad 
>        valid_lft forever preferred_lft forever
> ---
> 
> ...at every level of namespacing, the order is swapped. Note that
> iproute2 also reports them in the order they're sent over netlink.
> 
> > Maybe we should just make the order random, so equally breaking
> > everybody, and pushing user space to not assume any order :-)
> 
> The thing is... the kernel assumes the order. :) But it also has to.
> 
> -- 
> Stefano
> 

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmoZGq4ACgkQzQJF27ox
2GeUzw//Xf5R4KJQHrOaTwsrOX26p9q1sfPSrLIuvFNz/CVFNPk82YhD0AZ/Papb
GlKq43JUyOrdv88BWFF4Wke2p1gwsL36ATp44Ou5xYZHqwYfBE36OOdEBk5c9w+G
xXRHaTP0lnL92rKOslgXjWEIzvbRHU9qpQDNTuzon1mGJdV34tTnp8s3FHi30Hre
Lgro8xvscKUu2ywBPtRGNNl0ERMZO4QQmuEKbbiNKMOk53DC+x64xtkxaqFaPr/z
LVmiwezWwRI2YSfGMzm8BwG+JbCwmYCmyet83hWjlRTHBPtubJAUAeVtlIho/lKf
q1z47ZzpMREGJVckbrffOIUUngcpkmxNjSHZxzdmXrIwHk1VjCz1aNwVZMR25j/J
s0snNyuOUaccP+aVJE3m/ovRGJsAFz517fm98paV00rMRHRHJc2Jf5PUAwfXuGnL
jTGOo++zjMn3Ny11BnnAamWpAFOhNAZSkSXSFM5pZRav9N/7JrPSeN6D6aSCFb/e
kOg9vTLEoFWv42Y89BV8pODJohI9tLZ1hrLZZYVBbTXtwmUTm6/V/BYtWb0cy3X4
/O9PWKrUEZHizaXW1XfU/IGHGq9/kDWdlm1JS4Qf0nFbSs1/X5nqOfrm1pAX/QNq
7Gr9Y6dudQF/t5AXU7P2kcM6IR6yFMwE64Na/DNFGGguvERi8ZQ=
=yIsZ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.