The most pressing problem fixed here is that spliced connections with a remapped destination port would be attempted on the wrong side. This is an old issue as indicated by the Fixes: tag. Patch 1/3 restores sanity in comments before we attempt to fix the issue, patch 2/3 fixes the actual issue, and patch 3/3 introduces a minor rework on top to fix another issue, where if the user explicitly configures a loopback address in a port binding we would still create a non-spliced socket stealing the related connections. Stefano Brivio (3): tcp, tcp_splice: Adjust comments to current meaning of inbound and outbound tcp, tcp_splice: Fix port remapping for inbound, spliced connections tcp: Don't create 'tap' socket for ports that are bound to loopback only tcp.c | 187 ++++++++++++++++++++++++++++++++------------------- tcp_splice.c | 20 ++++-- util.h | 3 + 3 files changed, 134 insertions(+), 76 deletions(-) -- 2.35.1