From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top, Xun Gu <xugu@redhat.com>
Subject: Re: [PATCH] netlink: Don't require address to be global, just not link local
Date: Wed, 1 Oct 2025 10:26:09 +1000 [thread overview]
Message-ID: <aNx1IS6WptptJQCH@zatzit> (raw)
In-Reply-To: <20250930131402.7f6797d5@elisabeth>
[-- Attachment #1: Type: text/plain, Size: 2456 bytes --]
On Tue, Sep 30, 2025 at 01:14:02PM +0200, Stefano Brivio wrote:
> On Tue, 30 Sep 2025 15:49:11 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
>
> > nl_addr_get() will only pick up global IPv6 addresses (RT_SCOPE_UNIVERSE).
> > This is because link-local addresses aren't suitable. However site-local
> > addresses (in the rare occassions they're used) would be fine for our
> > purposes. In fact, anything wider than link scope is fine, so update the
> > check to reflect that.
> >
> > Change the logic in the test scripts to match as well.
> >
> > Reported-by: Xun Gu <xugu@redhat.com>
> > Link: https://bugs.passt.top/show_bug.cgi?id=122
> >
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> > netlink.c | 2 +-
> > test/demo/podman | 4 ++--
> > test/migrate/basic | 2 +-
> > test/migrate/basic_fin | 2 +-
> > test/migrate/iperf3_bidir6 | 2 +-
> > test/migrate/iperf3_in6 | 2 +-
> > test/migrate/iperf3_many_out6 | 2 +-
> > test/migrate/iperf3_out6 | 2 +-
> > test/migrate/rampstream_in | 2 +-
> > test/migrate/rampstream_out | 2 +-
> > test/passt/dhcp | 2 +-
> > test/passt/ndp | 2 +-
> > test/passt_in_ns/dhcp | 2 +-
> > test/pasta/dhcp | 2 +-
> > test/pasta/ndp | 2 +-
> > test/perf/pasta_tcp | 2 +-
> > test/perf/pasta_udp | 2 +-
> > test/two_guests/basic | 2 +-
> > 18 files changed, 19 insertions(+), 19 deletions(-)
> >
> > diff --git a/netlink.c b/netlink.c
> > index c4367807..9fe70f2c 100644
> > --- a/netlink.c
> > +++ b/netlink.c
> > @@ -786,7 +786,7 @@ int nl_addr_get(int s, unsigned int ifi, sa_family_t af,
> >
> > prefix_max = *prefix_len = ifa->ifa_prefixlen;
> > } else if (af == AF_INET6 && addr &&
> > - ifa->ifa_scope == RT_SCOPE_UNIVERSE &&
> > + ifa->ifa_scope < RT_SCOPE_LINK &&
>
> Oh, I had no idea RT_SCOPE_SITE even existed.
Yeah, site-local addresses seem to be one of those things that was
written into an RFC, but then everyone decided was a bad idea and
didn't use. Strangely enough Xun Gu's test machine has one, though.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2025-10-01 0:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 5:49 David Gibson
2025-09-30 11:14 ` Stefano Brivio
2025-10-01 0:26 ` David Gibson [this message]
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=aNx1IS6WptptJQCH@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
--cc=xugu@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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).