On Mon, Mar 03, 2025 at 08:29:11PM -0500, Jon Maloy wrote: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. v4: - Even more changes after feedback from D. Gibson v5: - Added corresponding patches for IPv6 v6: - Fixed some small nits after comments from D. Gibson. v7: - Added handling of all rejected ICMP messages - Returning correct user data amount if IPv6 as per RFC 4884. v8: - Added MTU to ICMPv4 ICMP_FRAG_NEEDED messages. - Added ASSERT() validation to message creation functions. v9: - Using real source address of ICMP to complement destination address for originial UDP message when needed.I think the changes for this are fine as far as they go. It does raise an additional wrinkle for when we try to do this for "listening" sockets: since the ICMP may be coming from somewhere other than the destination of the triggering message, we can't rely on the source address to find the correct flow. I think we'll need to use EE_OFFENDER() to get the information we need, which will also mean extended our cmsg buffers a bit: looks like the kernel puts a sockaddr after the extended_err structure. -- 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