public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v5 00/15] Reduce differences between inbound and outbound socket binding
@ 2025-12-02  4:02 David Gibson
  2025-12-02  4:02 ` [PATCH v5 01/15] util: Correct error message on SO_BINDTODEVICE failure David Gibson
                   ` (15 more replies)
  0 siblings, 16 replies; 21+ messages in thread
From: David Gibson @ 2025-12-02  4:02 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

This series is based on my series fixing bug 176 (regression in auto
forwarding).

The fact that outbound forwarding sockets are bound to the loopback
address, whereas inbound forwarding sockets are (by default) bound to
the unspecified address leads to some unexpected differences between
the paths setting up each of them.

An idea for tackling bug 100 suggested a different approach which will
also reduce some of those differences and allow more code to be shared
between the two paths.  I've since discovered that this approach
doesn't help for bug 100, but I think it's still worthwhile for other reasons.

v5:
 - Combine with SO_BINDTODEVICE and bug 113 patch series
 - Add fallback handling for kernels without SO_BINDTODEVICE
 - Add missing struct field documentation for no_bindtodevice
v4:
 - Add cleanup patch removing unused structure field
 - Rebase, fixing conflicts with Laurent's changes
 - A bunch of spelling and other cosmetic fixes
 - Clarify relation to bug 100 and bug 113
v3:
 - A number of additional fixes covering the handling of IPV6_V6ONLY sockopt
 - Assorted trivial changes
v2:
 - Some rearrangements and rewordings for clarity

David Gibson (15):
  util: Correct error message on SO_BINDTODEVICE failure
  util: Extend sock_probe_mem() to sock_probe_features()
  conf: More useful errors for kernels without SO_BINDTODEVICE
  flow: Remove bogus @path field from flowside_sock_args
  inany: Let length of sockaddr_inany be implicit from the family
  util, flow, pif: Simplify sock_l4_sa() interface
  tcp: Merge tcp_ns_sock_init[46]() into tcp_sock_init_one()
  udp: Unify some more inbound/outbound parts of udp_sock_init()
  udp: Move udp_sock_init() special case to its caller
  util: Fix setting of IPV6_V6ONLY socket option
  tcp, udp: Remove fallback if creating dual stack socket fails
  tcp, udp: Bind outbound listening sockets by interface instead of
    address
  util: Rename sock_l4_dualstack() to sock_l4_dualstack_any()
  tcp: Always populate oaddr field for socket initiated flows
  fwd: Preserve non-standard loopback address when splice forwarding

 conf.c       |  16 ++++-
 flow.c       |  22 +++----
 fwd.c        |   4 +-
 icmp.c       |   3 +-
 inany.h      |  17 ++++++
 passt.c      |   2 +-
 passt.h      |   2 +
 pif.c        |  27 ++-------
 pif.h        |   2 +-
 tcp.c        | 162 +++++++++++++++++++++------------------------------
 tcp.h        |   5 +-
 tcp_splice.c |   5 +-
 udp.c        | 122 +++++++++++++++++++++-----------------
 udp.h        |   5 +-
 util.c       | 102 +++++++++++++++++++++++++++-----
 util.h       |  10 ++--
 16 files changed, 289 insertions(+), 217 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-12-03 13:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-02  4:02 [PATCH v5 00/15] Reduce differences between inbound and outbound socket binding David Gibson
2025-12-02  4:02 ` [PATCH v5 01/15] util: Correct error message on SO_BINDTODEVICE failure David Gibson
2025-12-02  4:02 ` [PATCH v5 02/15] util: Extend sock_probe_mem() to sock_probe_features() David Gibson
2025-12-03  6:34   ` Stefano Brivio
2025-12-02  4:02 ` [PATCH v5 03/15] conf: More useful errors for kernels without SO_BINDTODEVICE David Gibson
2025-12-02  4:02 ` [PATCH v5 04/15] flow: Remove bogus @path field from flowside_sock_args David Gibson
2025-12-02  4:02 ` [PATCH v5 05/15] inany: Let length of sockaddr_inany be implicit from the family David Gibson
2025-12-02  4:02 ` [PATCH v5 06/15] util, flow, pif: Simplify sock_l4_sa() interface David Gibson
2025-12-02  4:02 ` [PATCH v5 07/15] tcp: Merge tcp_ns_sock_init[46]() into tcp_sock_init_one() David Gibson
2025-12-02  4:02 ` [PATCH v5 08/15] udp: Unify some more inbound/outbound parts of udp_sock_init() David Gibson
2025-12-02  4:02 ` [PATCH v5 09/15] udp: Move udp_sock_init() special case to its caller David Gibson
2025-12-02  4:02 ` [PATCH v5 10/15] util: Fix setting of IPV6_V6ONLY socket option David Gibson
2025-12-02  4:02 ` [PATCH v5 11/15] tcp, udp: Remove fallback if creating dual stack socket fails David Gibson
2025-12-02  4:02 ` [PATCH v5 12/15] tcp, udp: Bind outbound listening sockets by interface instead of address David Gibson
2025-12-03  4:41   ` David Gibson
2025-12-03  6:38     ` Stefano Brivio
2025-12-03 13:13       ` Stefano Brivio
2025-12-02  4:02 ` [PATCH v5 13/15] util: Rename sock_l4_dualstack() to sock_l4_dualstack_any() David Gibson
2025-12-02  4:02 ` [PATCH v5 14/15] tcp: Always populate oaddr field for socket initiated flows David Gibson
2025-12-02  4:02 ` [PATCH v5 15/15] fwd: Preserve non-standard loopback address when splice forwarding David Gibson
2025-12-03  6:34 ` [PATCH v5 00/15] Reduce differences between inbound and outbound socket binding Stefano Brivio

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).