From: Jon Maloy <jmaloy@redhat.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top, pONy4THS@protonmail.com, dgibson@redhat.com
Subject: Re: [PATCH v6 4/4] udp: create and send ICMPv6 to local peer when applicable
Date: Wed, 26 Feb 2025 15:28:58 -0500 [thread overview]
Message-ID: <80e25be3-e215-4579-b0cd-1e5d60439769@redhat.com> (raw)
In-Reply-To: <20250225151958.4cb07c5e@elisabeth>
On 2025-02-25 09:19, Stefano Brivio wrote:
> On Mon, 24 Feb 2025 14:24:47 -0500
> Jon Maloy <jmaloy@redhat.com> wrote:
>
>> When a local peer sends a UDP message to a non-existing port on an
>> existing remote host, that host will return an ICMP message containing
>> the error code ICMP_PORT_UNREACH, plus the header and the first eight
>> bytes of the original message. If the sender socket has been connected,
>> it uses this message to issue a "Connection Refused" event to the user.
>>
>> Until now, we have only read such events from the externally facing
>> socket, but we don't forward them back to the local sender because
>> we cannot read the ICMP message directly to user space. Because of
>> this, the local peer will hang and wait for a response that never
>> arrives.
>>
>> We now fix this for IPv6 by recreating and forwarding a correct ICMP
>> message back to the internal sender. We synthesize the message based
>> on the information in the extended error structure, plus the returned
>> part of the original message body.
>>
>> Note that for the sake of completeness, we even produce ICMP messages
>> for other error codes. We have noticed that at least ICMP_PROT_UNREACH
>> is propagated as an error event back to the user.
>
> Have a look at https://bugs.passt.top/show_bug.cgi?id=63#c1 if you
> haven't (I didn't really go through it).
>
> While bug #63 is beyond the scope of this series, if you register an
> account on the bug tracker you can be Cc'ed on comments.
>
For some reason I never receive a confirmation email when trying to
create an account, nor any reset email in case I have one (not sure.)
Anyway, I´ll try to introduce some of this. The 1280 byte IPCv6 returned
data should be the easiest one.
///jon
next prev parent reply other threads:[~2025-02-26 20:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 19:24 [PATCH v6 0/4] Reconstruct ICMP headers for failed UDP connect Jon Maloy
2025-02-24 19:24 ` [PATCH v6 1/4] tap: break out building of udp header from tap_udp4_send function Jon Maloy
2025-02-24 19:24 ` [PATCH v6 2/4] udp: create and send ICMPv4 to local peer when applicable Jon Maloy
2025-02-24 19:24 ` [PATCH v6 3/4] tap: break out building of udp header from tap_udp6_send function Jon Maloy
2025-02-24 19:24 ` [PATCH v6 4/4] udp: create and send ICMPv6 to local peer when applicable Jon Maloy
2025-02-25 14:19 ` Stefano Brivio
2025-02-26 20:28 ` Jon Maloy [this message]
2025-02-26 20:36 ` Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80e25be3-e215-4579-b0cd-1e5d60439769@redhat.com \
--to=jmaloy@redhat.com \
--cc=dgibson@redhat.com \
--cc=pONy4THS@protonmail.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).