public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
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: Tue, 30 Sep 2025 13:14:02 +0200	[thread overview]
Message-ID: <20250930131402.7f6797d5@elisabeth> (raw)
In-Reply-To: <20250930054911.1800690-1-david@gibson.dropbear.id.au>

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.

Applied.

-- 
Stefano


  reply	other threads:[~2025-09-30 11:14 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 [this message]
2025-10-01  0:26   ` David Gibson

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=20250930131402.7f6797d5@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --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).