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=202502 header.b=SA0i5Byv; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 8FF4B5A062A for ; Fri, 21 Feb 2025 07:03:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1740104751; bh=GzFzt5kSBviwV+7Pribm6o7hR5AVnSKYmUeWbRav/K8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SA0i5ByvOXNRzxA/kaH8ElyUyoCLYOxznX4Yr5qNNSIe5uyTunpdsPh/wWCBGd/2Z x0pZYuNXYaFV/YrWAhI2j2pX1GmT/inhvzSMSwSOcjZu7T2oDZDeus5xN7x8DNQOe2 hKmuJlAcNwmfa+L3806sLHdBSVWi+Qbsw+mMU0rf/JNNiizH5cXtp5AUV4eKyUzanN jE4r6TwE6ikx3hQMUraot4Otr7CXKGTAO7vzplMr1FGvGE5QbUZR7GheSGbiUHCIzJ P7oT+m/1HHZZKEclLtaotN4MMEq6RaH75hpodFrG7Hpr+X6XzOjsEyhdtjqeeK1qdw 5eKKlP4TPyVTg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4YzYrv1q9nz4x3J; Fri, 21 Feb 2025 13:25:51 +1100 (AEDT) Date: Fri, 21 Feb 2025 13:25:42 +1100 From: David Gibson To: Jon Maloy Subject: Re: [PATCH v3 0/2] Reconstruct ICMP headers for failed UDP connect Message-ID: References: <20250219193007.2336670-1-jmaloy@redhat.com> <1552ddef-b61f-4754-9990-e3c0d28b3782@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kd4LGwJKBgbuPf98" Content-Disposition: inline In-Reply-To: <1552ddef-b61f-4754-9990-e3c0d28b3782@redhat.com> Message-ID-Hash: M3JTZOA6GNGF4A3BFJRKYTVVBTC2A66T X-Message-ID-Hash: M3JTZOA6GNGF4A3BFJRKYTVVBTC2A66T 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, sbrivio@redhat.com, lvivier@redhat.com, dgibson@redhat.com 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: --kd4LGwJKBgbuPf98 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 20, 2025 at 11:08:28AM -0500, Jon Maloy wrote: >=20 >=20 > On 2025-02-19 22:47, David Gibson wrote: > > On Wed, Feb 19, 2025 at 02:30:05PM -0500, Jon Maloy wrote: > > > Reconstruct incoming ICMP headers for failed UDP connect and forward = back > > > to local peer. > > >=20 > > > v2: - Added patch breaking out udp header creation from function > > > tap_udp4_send(). > > > - Updated the ICMP creation by using the new function. > > > - Added logics to find correct flow, depending on origin. > > > - All done after feedback from David Gibson. > > > v3: - More changes after feedback from David Gibson. > >=20 >=20 > [...] >=20 > > "listening" socket. > >=20 > > The only way I can see to fix this would be to create connect()ed > > sockets for both ends of a flow when we establish it. I _think_ we can > > have the listening and connected socket concurrently (at least with > > REUSEADDR) with the connect()ed socket taking priority when it > > matches. > >=20 > > However, it does have a complication: there's a brief time window > > between bind() and connect() on the new socket, when it might pick up > > packets that should go to the original listening socket. We'd need to > > decide what to do with that case. > >=20 > > In any case, it kind of looks like there's not much point trying to > > handle error events on the listening socket (beyond a debug() > > message), since I'm not sure such events are ever delivered. > >=20 >=20 > I eliminated the handling of listener sockets ICMPs in my latest > version. I think that makes sense for now. > I can create a separate connected socket in a separate patch, > if you agree that is the way to go. That's reasonable. Fwiw someone momentarily popped up on the IRC and suggested trying to read MSG_ERRQUEUE for the listening sockets on EPOLLIN events. I don't know if that will do anything useful, but you could try. --=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 --kd4LGwJKBgbuPf98 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAme35BcACgkQzQJF27ox 2GdTOg/+Jn3DzrC4mY9OayJD2AxByezE2n/fE1wis8LyKi3mvxIvq2FG6P0wWozt wDChnxXlHZOsHdSyFgwe9iQoAkdWBNnpv2GUbIchJvSMqKsgvwuiaM3MOM6V+cDt pI6HY7Z9U/Y/A3UK8ahE6tfB/SOmy7GvBQia/FqyLPCKYriDw+IoNgU98DMSa88l w/f1Nu/G0IeddatTHVzi+X3k4NlCZ/CBwwt2MFHB1gvNp/ZtlJz76Q1pV1lx8QjU 8TkwCsz8WYO4DpO75WWLxz59YS0K4Xtt2metnoHiSBRxlVx5uq0iYrSY+MW7QCoH Bf/cGmuJlRfWh0aWTg3ELkGUEJ4Z7CnLENeCrOuyFVfE4oGCuZIj5ZUD/LJbSd0L qI+C8yY3lj0q3glxy7xG4sNP3JEABP6KlSoS7SzKddcZ0MjuUbXwW+BRtybOLO9j naV3P4J8TywcqWycr3qr3R4E4LGWk8npBJtZQs6oOju8e7t1FMX6amYguUswpakW furlls8R6GGJ2h6dE75ZwkC0t+HVbBaWz5TJzF/efyMvOJdTOyCt4QQ+qgc08Usm H7UYlrJ2bKDu6qq0/VRsqBza8wNIgS/7L4QU39dsEn2NcOEaVg+VakDUJRiSiWA3 DOwJZggdnX3mEc12ngcJ7n1Suhopf/atTW6UiFUC9P/tN6tZmGQ= =tfHu -----END PGP SIGNATURE----- --kd4LGwJKBgbuPf98--