From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 0F4695A0267 for ; Thu, 13 Oct 2022 06:09:49 +0200 (CEST) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Mnwyb3G6cz4xGn; Thu, 13 Oct 2022 15:09:43 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1665634183; bh=OKukvLkiSnD2GFkuioCkU3P44/kDx7aIgtbFOtSz768=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M4S1x2sisNcKz99e4ZYi0FZNJtK04P+dSJ48l5QVkUtH41MAX7f/MCqpsjVq1qaBo fzL7wbv7dYWz8aTHuPyNSDbt9M1+j33+EAPcl5QSO/J59L3XwXVD2pdBHzJqqAjsxI KxnxgqU7K+87jpPpIC4TYU7PfKB6R7xCRhcD9qKY= Date: Thu, 13 Oct 2022 12:11:04 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] icmp: Set sin6_scope_id for outbound ICMPv6 echo requests Message-ID: References: <20221012154530.1650534-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UFiIHtsHJyCXpRAx" Content-Disposition: inline In-Reply-To: <20221012154530.1650534-1-sbrivio@redhat.com> Message-ID-Hash: PWDSMX2CD5YB7NRWGOOCMGKEH764SCOQ X-Message-ID-Hash: PWDSMX2CD5YB7NRWGOOCMGKEH764SCOQ 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 X-Mailman-Version: 3.3.3 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: --UFiIHtsHJyCXpRAx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 12, 2022 at 05:45:30PM +0200, Stefano Brivio wrote: > If we ping a link-local address, we need to pass this to sendto(), as > it will obviously fail with -EINVAL otherwise. >=20 > If we ping other addresses, it's probably a good idea anyway to > specify the configured outbound interface here. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > icmp.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/icmp.c b/icmp.c > index 6bd87fd..21ea2d7 100644 > --- a/icmp.c > +++ b/icmp.c > @@ -192,6 +192,7 @@ int icmp_tap_handler(const struct ctx *c, int af, con= st void *addr, > struct sockaddr_in6 sa =3D { > .sin6_family =3D AF_INET6, > .sin6_addr =3D IN6ADDR_ANY_INIT, > + .sin6_scope_id =3D c->ifi6, > }; > struct icmp6hdr *ih; > int id, s; --=20 David Gibson | 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 --UFiIHtsHJyCXpRAx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmNHZaAACgkQgypY4gEw YSKmWA/5Acv9JTH0Z1ExsTmu1f6ECzXxDPbd7wfFNIb/TIYYzjjaKus2cjKZAo7o 6EhEx9jAxXruKo23GjzBW2jyziO0NOCp0+Q5mjZmn/oD6EmZs34nPYszj0ur7lv5 CxhvJxxWb6IOGF2eA2dNnvTuK0PE9phNmlx+ZwO0/oixfCUtEGd5CH6OOxDHSePO QQZKA9QmU9gdbm3mr5CMsGTySDwNe4+8LmYaj5bGaJGxtu2spscoqmdbXlWYhk2M B0JAjwmo07oocTPBjCXyytay8eLoEWNF0VYETbyAUTghj33YAcHlISBW1kC1rQWj COK5REVtBYc2/sY3TjZqxHprcY2TL1nwvx8Dvk2sj+ogcLNbNut745ayDfWPFEBM TeSinWkM9rjFBSkJK8jqHYFtB8dBpvRQG9mlPnZf6J/h2ZuSvXD33ULbI2g9wwZ7 AjKXM0M3UG70OdCMhdwd5lOYdk0kdP4qx/EOxA+MYe06tM764FfzP6HB6R7qN4Om uRT3dwe4vK0xI0MGV/vqHResqcoeVNyBD6/Qxn64QyiFxONb653PFLVIG4TdKi0w 6ysabFZCzRIt+1qeprdzOYZu1T5LTkn1A9Jae1QhwvemfwtROmmUC+3kCLm+qIuy 7oT8+x+yjNaHIAhaCS9IhaGhpHpFeiiTxFPRbYGRecWek3CHECQ= =tFE7 -----END PGP SIGNATURE----- --UFiIHtsHJyCXpRAx--