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.
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.
[...]
"listening" socket.
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.
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.
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.
I eliminated the handling of listener sockets ICMPs in my latest version.
I can create a separate connected socket in a separate patch,
if you agree that is the way to go.
///jon