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=Dt7c5ImI; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 3BB845A0653 for ; Mon, 15 Dec 2025 11:08:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1765793302; bh=uSVeb1287lvw30frPVrQG4OpxkePeGJlEQAEN0Fg2FA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dt7c5ImIPtf59/d0aNV62iOSeLG8JqFsblZUnB2MATIhCCn6t1oi4pbxXYjROdXUv wvIv6Z6+AC04dRzhJBkqvQHrnYLrbGxDTjMG0XG5dx/2B3Nia5JMdIsHuxhWgW19Yg GLYfsFoXAB2Brdz8kDiu4ts9Ki8lyPNi7i3t7S/3RE+im5RXu2T6qJkKPxues8JTPo WiSKDPCd1WsOStqaa4iO+9s6O0guNuTPy3pozOKZp94Btv1T0V9bhJp87PLCv+6Egn qJ/onjxUzyctq1WRUzHBDz3IOetNXmNHF9fPML5hU1Z18LE5R1jpm/ZHdNwYABo9oI /OgXzU12efREQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dVG3V22s6z4wDk; Mon, 15 Dec 2025 21:08:22 +1100 (AEDT) Date: Mon, 15 Dec 2025 20:46:54 +1100 From: David Gibson To: Jon Maloy Subject: Re: [RFC 01/12] ip: Introduce multi-address data structures for IPv4 and IPv6 Message-ID: References: <20251215015441.887736-1-jmaloy@redhat.com> <20251215015441.887736-2-jmaloy@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lIbZTHXLG01nzi58" Content-Disposition: inline In-Reply-To: <20251215015441.887736-2-jmaloy@redhat.com> Message-ID-Hash: HFGI4EMFBYLP44O6JU6Q5ITHFEFWNJP6 X-Message-ID-Hash: HFGI4EMFBYLP44O6JU6Q5ITHFEFWNJP6 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: sbrivio@redhat.com, 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: --lIbZTHXLG01nzi58 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 14, 2025 at 08:54:30PM -0500, Jon Maloy wrote: > As preparation for supporting multiple addresses per interface, we > replace the single addr/prefix_len fields with arrays. >=20 > - We add an ip4_addr_entry and an ip6_addr_entry struct containing > address and prefix length. >=20 > - We set the array sizes to IP4_MAX_ADDRS=3D8 and IP6_MAX_ADDRS=3D16, > respectively. >=20 > The only functional change is that the IPv6 prefix length now is > properly stored instead of being hardcoded to 64 even when set > via the -a option. >=20 > Signed-off-by: Jon Maloy > --- > arp.c | 4 +-- > conf.c | 97 +++++++++++++++++++++++++++++++++----------------------- > dhcp.c | 8 ++--- > dhcpv6.c | 6 ++-- > fwd.c | 12 +++---- > ip.h | 26 +++++++++++++++ > ndp.c | 6 ++-- > passt.h | 16 ++++++---- > pasta.c | 12 ++++--- > tap.c | 4 +-- > util.h | 1 + > 11 files changed, 122 insertions(+), 70 deletions(-) >=20 > diff --git a/arp.c b/arp.c > index bb042e9..7eaf517 100644 > --- a/arp.c > +++ b/arp.c > @@ -54,7 +54,7 @@ static bool ignore_arp(const struct ctx *c, > return true; > =20 > /* Don't resolve the guest's assigned address, either. */ > - if (!memcmp(am->tip, &c->ip4.addr, sizeof(am->tip))) > + if (!memcmp(am->tip, &c->ip4.addrs[0].addr, sizeof(am->tip))) > return true; Sorry, missed this on my first pass. This needs to skip *all* of the guest addresses, not just the first one. Otherwise passt will respond to arps for the guest's other addresses with its own MAC which will break everything. --=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 --lIbZTHXLG01nzi58 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmk/2Q0ACgkQzQJF27ox 2GfL1w/9EwGPjggsFueb6udvAjiKDMjSFzANYukbhzuA8zMlArHRlEEkUjpc8ZfC USFH3Cf9UuZyf0DLcCiI3LNGNZLDBp/HKVHPLr1TTZ3OwaJq5XgZ8E6zxjsH+M4k +qtWSJFtXKcm8Pm7FzWa7QcEvSWm7WLQelys4RQIiI1lmfZefar25VvM+75wnnmp 5AjgTRMM2XuuzABkwvvNpdHdFMQZbi8iIHtin2eaW/U6Zg6h5rvaiKDxzolP3OPf aMPjmi8bISxv44YKXgSkZ/Gli/NfC0NfxIAgLppr9egjWqP0AWn5qvN+aHA8BJ0E ZQskDZXgIjZBVtygsQNRGQUb+Q52I6ThIu8oS7MN/yflrFiDtQHcvrjZULTOtTI5 2/eburvT4bNyE+NSseOEi7b0h9S9irhdOR4zvv29Heo/XCSbSGcCquTJUca2hRv/ Pr9XluXxXEggXGEhZ4UIMvsFilv5koUCDCJzcHHqscylNokQsCyWS/hSsU/hGpqI nhCPOFgfRsTclJZLKZM+H7Ly8rbSwKV9bVbJ6RwWN249AKdvBPjKrvnoU+r7HXZg JDf4Gbu/E+pWCl9aF+XrCORlMbawO+KdyIWLzsimxRLGEmq9Po02QgrEFcx4G+f3 NeSBA92h9JyQar/tUnZ4U8/VxI0vaBXz0FGObPB7c+NoKCEkTns= =+RIt -----END PGP SIGNATURE----- --lIbZTHXLG01nzi58--