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=202512 header.b=pngqACE+; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 4DE1E5A0271 for ; Tue, 27 Jan 2026 10:08:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1769504904; bh=mk9k+zDWUVx/oOoHKX2ftl0wexWmfjjqFRE0wGbHyFo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pngqACE+qtn4uCqkG0zTP81Bqz7xTePZRASsb6y1xw7KeaWPB/xP5apgh9lN6Eraj 8a4gRv3Zk8EDais2KEqcib5kSv8vmYSw9sXJpQWoDY5+keHIK5rnVr1rYCAQMJJ5uD mbB8Mo/ABFXhaRtchzD8zPVMsuPDFppQddlYLHsrjVGCBRtt6OTFhtQyj8aokT/KVh q+0r1mpzJdB/2EKB9f8a7e8SryMVfb2ISrwb5j1SY63koVzKBmlR+Pyv1X3xKHN5sY coirDtTBbm/Rucm8+a0yhu01RKSOiEccKdUIr3NLwbjmm+O2EZLM6ti3jxWDaYqCi5 BLc2WczjqYifw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4f0fhS0gzbz4w2D; Tue, 27 Jan 2026 20:08:24 +1100 (AEDT) Date: Tue, 27 Jan 2026 20:07:34 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 3/9] conf: Refactor conf_print() for multi-address support Message-ID: References: <20260118221612.2115386-1-jmaloy@redhat.com> <20260118221612.2115386-4-jmaloy@redhat.com> <20260121140209.60214f05@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SSDo9I0nRlFnRX0H" Content-Disposition: inline In-Reply-To: <20260121140209.60214f05@elisabeth> Message-ID-Hash: PSVH3QK3ITRR3CGDSGSX3AG5KSM5A5YD X-Message-ID-Hash: PSVH3QK3ITRR3CGDSGSX3AG5KSM5A5YD 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: Jon Maloy , dgibson@redhat.com, passt-dev@passt.top 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: --SSDo9I0nRlFnRX0H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 21, 2026 at 02:02:09PM +0100, Stefano Brivio wrote: > On Sun, 18 Jan 2026 17:16:06 -0500 > Jon Maloy wrote: [snip] > > @@ -1230,30 +1238,34 @@ static void conf_print(const struct ctx *c) > > } > > =20 > > if (c->ifi6) { > > + bool do_slaac =3D !c->no_ndp || !c->no_dhcpv6; >=20 > We can enable DHCPv6 and disable SLAAC though. The "SL" in SLAAC stands > for "stateless", DHCPv6 is stateful. We can enable both, one, or none. Hm.. I thought DHCPv6 was designed to require SLAAC (although in a kind of minimal mode). > The 'dns6' label was meant to avoid a variable like this one and > another block, maybe it would be more practical to keep it. >=20 > > + > > if (!IN6_IS_ADDR_UNSPECIFIED(&c->ip6.map_host_loopback)) > > info(" NAT to host ::1: %s", > > inet_ntop(AF_INET6, &c->ip6.map_host_loopback, > > buf6, sizeof(buf6))); > > =20 > > - if (!c->no_ndp && !c->no_dhcpv6) > > - info("NDP/DHCPv6:"); > > - else if (!c->no_dhcpv6) > > - info("DHCPv6:"); > > - else if (!c->no_ndp) > > - info("NDP:"); > > - else > > - goto dns6; > > - > > - info(" assign: %s", > > - inet_ntop(AF_INET6, &c->ip6.addrs[0].addr.a6, > > - buf6, sizeof(buf6))); > > - info(" router: %s", > > - inet_ntop(AF_INET6, &c->ip6.guest_gw, buf6, sizeof(buf6))); > > - info(" our link-local: %s", > > - inet_ntop(AF_INET6, &c->ip6.our_tap_ll, > > - buf6, sizeof(buf6))); > > - > > -dns6: > > + if (do_slaac) { > > + if (!c->no_ndp && !c->no_dhcpv6) > > + info("NDP/DHCPv6:"); > > + else if (!c->no_dhcpv6) > > + info("DHCPv6:"); > > + else > > + info("NDP:"); > > + > > + for (i =3D 0; i < c->ip6.addr_count; i++) { > > + info(" assign: %s", > > + inet_ntop(AF_INET6, &c->ip6.addrs[i].addr.a6, > > + buf6, sizeof(buf6))); >=20 > I don't see a matching change for neither NDP nor DHCPv6, so we > shouldn't really print more than one address (at least until this > point). >=20 > > + } > > + info(" router: %s", > > + inet_ntop(AF_INET6, &c->ip6.guest_gw, > > + buf6, sizeof(buf6))); > > + info(" our link-local: %s", > > + inet_ntop(AF_INET6, &c->ip6.our_tap_ll, > > + buf6, sizeof(buf6))); > > + } > > + > > for (i =3D 0; !IN6_IS_ADDR_UNSPECIFIED(&c->ip6.dns[i]); i++) { > > if (!i) > > info("DNS:"); >=20 > I reviewed up to 5/9 so far, no further comments until then. >=20 > --=20 > Stefano >=20 --=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 --SSDo9I0nRlFnRX0H Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAml4gEwACgkQzQJF27ox 2GePFg/8CtOdiYj4x3YHYF9G4kY9pvFsuVqJoyTok6pDN3yFTGeijbQUm0pQUiaz lZpSShv85V1W/oW8pU9qdlD9PFVxpmllMx2GrK/+c0dpdbCeveWeNkI4tygk95om ybJGMadI4gsmCcXSvN+tJrqrO0byLL4SiN8Pyok5iQHpkbeyM9b7Kq/1OJOF1FGo 8cn0bmvtWVtB2O2Iic69Octjsw0etI8LhA4DEFjsrd/OSoaFzbNcCzX2Il52Yn+0 GxH28Z1hnICHqek+yRSNAbm5mDZAtvugf77Op9beYYMBV7b77UHO+D4lX04H2Yfg MwbEooui148f4UEl2J2VuVXYNxyBOtR2dOpkTQQrKtflrj3YT3r7VSpBt+4t7pUs hXd+9oT9WaIE6+m6VmOc8PT99s+eqo7mJCv0GKIqbJYv6VYXAjFni2x6rjwsaYc0 m5OZEEhirC2tSlEoOaI9gXXTOhwpaCXb+4NCB2a2X/ESwkZCt3DpIvCzDk3bOQfu cmeoxG5N8DKH+MMUtuLll/gYRuIFYnkyAAS0JpJ8u3KxnKnH7agf1HY6hLA6b+VB oDYkoeakQwoLp+nEbxVG7ozuUjOyerP8dGXNrxHujePviDrBh1h0YFewXACHtvx0 cXg35IDfRw/qYBRS2cOyIsh4YlzkXdVefx2Hqamnz+K/Kw8XpME= =PfJt -----END PGP SIGNATURE----- --SSDo9I0nRlFnRX0H--