All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	Fernando Fernandez Mancera <fmancera@suse.de>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Yumei Huang <yuhuang@redhat.com>,
	Ido Schimmel <idosch@idosch.org>,
	Justin Iurman <justin.iurman@gmail.com>,
	David Ahern <dsahern@kernel.org>,
	ihuguet@redhat.com,
	Linux kernel regressions list <regressions@lists.linux.dev>,
	Beniamino Galvani <bgalvani@redhat.com>
Subject: Re: Problem with IPv6 privacy addresses in 7.0
Date: Fri, 29 May 2026 11:42:52 +0200 (CEST)	[thread overview]
Message-ID: <20260529114216.2e42c4dd@elisabeth> (raw)
In-Reply-To: <ahkar8tE5M6u0_zZ@zatzit>

On Fri, 29 May 2026 14:48:47 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Thu, May 28, 2026 at 05:17:11PM +0200, Stefano Brivio wrote:
> > On Thu, 28 May 2026 16:34:02 +0200
> > Andrew Lunn <andrew@lunn.ch> 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.

It's not even hypothetical: iproute2 has that functionality (ip address
save / restore) and addresses are restored in the wrong order on kernel
versions without this change:

# ip a a ::2 dev x && ip a a ::3 dev x
# ip a s x
2: x: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c2:72:d1:7b:ac:26 brd ff:ff:ff:ff:ff:ff
    inet6 ::3/128 scope global tentative 
       valid_lft forever preferred_lft forever
    inet6 ::2/128 scope global tentative 
       valid_lft forever preferred_lft forever

# ip -6 a save dev x > dump
# ip a f x

# ip a restore < dump
# ip a s x
2: x: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c2:72:d1:7b:ac:26 brd ff:ff:ff:ff:ff:ff
    inet6 ::2/128 scope global tentative 
       valid_lft forever preferred_lft forever
    inet6 ::3/128 scope global tentative 
       valid_lft forever preferred_lft forever

So scripts using this are anyway broken (well, they would get the order
right on every other save/restore, which makes the breakage even more
subtle).

-- 
Stefano


  reply	other threads:[~2026-05-29  9:42 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 13:53 Problem with IPv6 privacy addresses in 7.0 Chris Adams
2026-05-27  0:57 ` Jakub Kicinski
2026-05-27  1:06   ` Chris Adams
2026-05-27  1:31     ` Jakub Kicinski
2026-05-27 21:13       ` Chris Adams
2026-05-27 21:16         ` Fernando Fernandez Mancera
2026-05-27 21:51         ` Jakub Kicinski
2026-05-27 21:51       ` Chris Adams
2026-05-27 21:59         ` Fernando Fernandez Mancera
2026-05-27 23:07           ` Jakub Kicinski
2026-05-28  5:38           ` Stefano Brivio
2026-05-28 10:46             ` Fernando Fernandez Mancera
2026-05-28 11:12               ` Stefano Brivio
2026-05-28 11:29                 ` Fernando Fernandez Mancera
2026-05-28 12:29                   ` Thorsten Leemhuis
2026-05-28 13:32                     ` Stefano Brivio
2026-05-28 14:02                       ` Thorsten Leemhuis
2026-05-28 14:15                       ` Íñigo Huguet
2026-05-28 14:53                         ` Stefano Brivio
2026-05-28 15:24                           ` Íñigo Huguet
2026-05-28 16:01                             ` Beniamino Galvani
2026-05-28 17:21                               ` Stefano Brivio
2026-05-28 18:42                                 ` Fernando Fernandez Mancera
2026-05-28 18:50                                   ` Fernando Fernandez Mancera
2026-05-28 19:22                                     ` Stefano Brivio
2026-05-29  4:47                                       ` David Gibson
2026-05-29  8:40                                       ` Beniamino Galvani
2026-05-29 17:40                                         ` Stefano Brivio
2026-05-28 14:34                       ` Andrew Lunn
2026-05-28 15:17                         ` Stefano Brivio
2026-05-29  4:48                           ` David Gibson
2026-05-29  9:42                             ` Stefano Brivio [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-29 18:28 Tj
2026-05-29 20:04 ` Stefano Brivio
2026-05-29 20:18   ` Tj
2026-06-01  8:08     ` Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260529114216.2e42c4dd@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=bgalvani@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dsahern@kernel.org \
    --cc=fmancera@suse.de \
    --cc=idosch@idosch.org \
    --cc=ihuguet@redhat.com \
    --cc=justin.iurman@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    --cc=yuhuang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.