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=kW8YXQjc; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A43B75A0623 for ; Mon, 19 Jan 2026 09:35:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1768811731; bh=D1dI962BEbhSqlI1YIpxiliPRfAIKOmkO6xrkyG7j1o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kW8YXQjcZU7qDX3O0/kz4lsZYc0i3lvt22ImdfvAH+nneANpq39yKXFMgjKI1AW4H auGiQCHsmT4zCTIJwWxGSZvI9Y/YFFumeQC7joOyffuu7WUrfD8UHb2hdPiPLe/XcV uVAfhWyv/L5BkOKIVZrfVI85Hr8uHKuObwXzym3UhhGeWVMRNNP2W6qYzoRqutc05P e8fWV6b76rpTstfxUf1i3PWZPrbcMGW9EGwXkNto0JgMbJzMumnY+v984DQOgZDL6j V4Ba5LRZkqXBIoFEfUPFDypUwF2g89rNNOxHx2R+8RU5F3HDVBoua/l9XKuhaUs0AN 2fOiUKNzGKMcg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dvkLC2XqFz4wHX; Mon, 19 Jan 2026 19:35:31 +1100 (AEDT) Date: Mon, 19 Jan 2026 19:28:20 +1100 From: David Gibson To: Jon Maloy Subject: Re: [PATCH v2 5/9] arp: Check all configured addresses in ARP filtering Message-ID: References: <20260118221612.2115386-1-jmaloy@redhat.com> <20260118221612.2115386-6-jmaloy@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TEa5I+xXQnkPbk3N" Content-Disposition: inline In-Reply-To: <20260118221612.2115386-6-jmaloy@redhat.com> Message-ID-Hash: 7FBY7DHH77OP5XENT4G22FJ3H6IZO43E X-Message-ID-Hash: 7FBY7DHH77OP5XENT4G22FJ3H6IZO43E 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: --TEa5I+xXQnkPbk3N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 18, 2026 at 05:16:08PM -0500, Jon Maloy wrote: > As a preparation for handling multiple addresses, we update ignore_arp() > to check against all addresses in the addrs[] array. >=20 > Signed-off-by: Jon Maloy LGTM, except insofar as I'm still not convinced the v4 only array of inany_addrs makes sense. > --- > arp.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) >=20 > diff --git a/arp.c b/arp.c > index bc77a9f..d8063e2 100644 > --- a/arp.c > +++ b/arp.c > @@ -41,6 +41,8 @@ > static bool ignore_arp(const struct ctx *c, > const struct arphdr *ah, const struct arpmsg *am) > { > + int i; > + > if (ah->ar_hrd !=3D htons(ARPHRD_ETHER) || > ah->ar_pro !=3D htons(ETH_P_IP) || > ah->ar_hln !=3D ETH_ALEN || > @@ -53,9 +55,11 @@ static bool ignore_arp(const struct ctx *c, > !memcmp(am->sip, am->tip, sizeof(am->sip))) > return true; > =20 > - /* Don't resolve the guest's assigned address, either. */ > - if (!memcmp(am->tip, inany_v4(&c->ip4.addrs[0].addr), sizeof(am->tip))) > - return true; > + /* Don't resolve any of the guest's addresses */ > + for (i =3D 0; i < c->ip4.addr_count; i++) > + if (!memcmp(am->tip, inany_v4(&c->ip4.addrs[i].addr), > + sizeof(am->tip))) > + return true; > =20 > return false; > } > --=20 > 2.52.0 >=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 --TEa5I+xXQnkPbk3N Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmlt6yMACgkQzQJF27ox 2GcZ+A/7B6Gdae5g+Z5wUdHmc+P1jwUyK9rTotElxd+7GMSBh0FNYNKcVkPxSe0o 2CIhDWw9e1fX3F8rJo0zAGXJcSHAYbvWYWMJovQhHuPVXMTmBcD+cMCQuspKAyM3 /E2X5rREOhTapIPNjQrKMzprf39zK3WpvlD2dc0WusK2wPPANQyjC8gHwQlPScH5 0t1uqsqx2m62FTDoUhg2vLilZCEPMc9iECfS1m6n0rtCb31HB+BI8rSJbTU8tx+e S8kOIMtYsTmGfzKub4jQTeqi8Xy9+frhYWcnupCOQTqLtPK/40ccpdZ7KZHJj5vm k+EQT9KvtJv/RBMuScJBHUczOfiN6Xdbd6c/G7uDqgdlMbT6ZfVqJmD1Vtxqv2v2 yYMJSJHWwV9MQ4CsS+27Uw1IzMii07LlCUJbFqZuAN/F4prjt5h4ZoknTE+7HET3 NFkqOHKiiFxZfbfeYWmCLs0zWkBOlWrPybcEcnGJ2Pk2q9qwYbvQGI2OgVIxaJE6 N3TUW0WdUgPo/V0J/8Doa7LzdtoexYuAjQ/Fw68h8TyRNe4vxjwrljdPjKp32UVc hCrgqg4Dzp+zjlIKNZYpJtVG9G/kmur/S83bJGk53x9dK/TRABIczyfCawIPuEFb Cz7bTjysVcgNe5ezuOgApox2wIm+UJfX6E0NzFsQq0dcz3uAGjc= =TbFF -----END PGP SIGNATURE----- --TEa5I+xXQnkPbk3N--