From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202508 header.b=v/67Wjpj; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id B9B615A0272 for ; Wed, 01 Oct 2025 02:28:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1759278480; bh=IQG3jjNiMLYBOjBHZUWTVG6iTEixJpu2wUv4HBFASo4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=v/67WjpjkOhmfzjFFDup9ikTQx9q54Fr/NlypGSYIVpgYSVGM2A4jvlB70NqdKuhM Ia/mnLkkj+pY0Z71jQ6TfkY5reuXlnQjAa0UZvmdR8lXZpBGHipiyTVFVZCn75ibdF rBvUYxhHSPxEa0EyTNAqb4YOBC2YxlhDrPLh8R1lU+mQSAArWinVEF/i1OKbUUZX9d Mq5u2uTjctk3pgjt1k43ixbMlGjc3zjPULuUGrhfaCFaR/o9AmsQs+M8tKIAYN2YWn tMxKcHCpS1ZsEslpj24+eNObx0tuhly+9DOcmw+T3RskG9p0JdlwkpP2A1GlIz8WDL UOR7uw9THVQ8g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cbwkS0Km5z4wCR; Wed, 1 Oct 2025 10:28:00 +1000 (AEST) Date: Wed, 1 Oct 2025 10:26:09 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] netlink: Don't require address to be global, just not link local Message-ID: References: <20250930054911.1800690-1-david@gibson.dropbear.id.au> <20250930131402.7f6797d5@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2b0Bf65MkJ6s7OIm" Content-Disposition: inline In-Reply-To: <20250930131402.7f6797d5@elisabeth> Message-ID-Hash: FANTV6H6WWCAWG7MUCZQUMAHN4NPUTO7 X-Message-ID-Hash: FANTV6H6WWCAWG7MUCZQUMAHN4NPUTO7 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Xun Gu X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --2b0Bf65MkJ6s7OIm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 30, 2025 at 01:14:02PM +0200, Stefano Brivio wrote: > On Tue, 30 Sep 2025 15:49:11 +1000 > David Gibson wrote: >=20 > > nl_addr_get() will only pick up global IPv6 addresses (RT_SCOPE_UNIVERS= E). > > This is because link-local addresses aren't suitable. However site-loc= al > > 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 t= he > > check to reflect that. > >=20 > > Change the logic in the test scripts to match as well. > >=20 > > Reported-by: Xun Gu > > Link: https://bugs.passt.top/show_bug.cgi?id=3D122 > >=20 > > Signed-off-by: David Gibson > > --- > > 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(-) > >=20 > > 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, > > =20 > > prefix_max =3D *prefix_len =3D ifa->ifa_prefixlen; > > } else if (af =3D=3D AF_INET6 && addr && > > - ifa->ifa_scope =3D=3D RT_SCOPE_UNIVERSE && > > + ifa->ifa_scope < RT_SCOPE_LINK && >=20 > 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. --=20 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 --2b0Bf65MkJ6s7OIm Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmjcdSAACgkQzQJF27ox 2GfmGg//bCV4/BnKiLbtYtLFwKhoo19FTumvCRRyCIbbDK0bgFscVJ8OlZ4vDcNt K2ig3WIvr70vMsgFPHTEEUV7PrfpStNGHXxr6XiFmd5UTleGUfSNv3weDfNXm5NQ EJ2bdwazqzju101decYCTneeDixs1RsrpI8nTPJNJ/GE6UJi4DwB5NGNaKfiG5K5 QguWtBNl0vOfjQFEdq7YnYBPS359KNYtnc4JifVQ2ZUzdIR1HMWkgL6yvIIsC0ME +p2Eh3+aLMiz74QoscqmbD9NDXT37FUZbi8EH8Cur0oAGOEL2QTpPzZjPoH9RMJB hGjgL3/XJBMyO78BrmVI1Va9EYj+nQ414Eq7WJch1cqfnHCSl2Ax3x6nf+3CCLeS oG81u63gNdZtb7aOL+RyTvZ4w/0R0NbgdLTCrQcaxwIAW6nP1Cn+tpdaO+LXaWq9 8kawGMqYQROFSGv+l2HWTJm0wSGANSH8Lc2xFDp6b8V+IlNwGS4eNa0WFDiZROvL UXK+h1qRBK6+Wxe0RPmdp9kmvdpp9yvr0wyzowStUOfKsWMWBeDS65iXFlo4EyZA Dp0AGp8tt5vHh+RRi9PAGGxWxx7d+9rWVHTdYnLllxH3Tz4iZBcVAdSoizmupyqE yIIdxhAm1iYtiIkli1luwy/BE3kQSMN4dFdt8D2Y7s9D+5WxM+o= =pnWE -----END PGP SIGNATURE----- --2b0Bf65MkJ6s7OIm--