From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202510 header.b=ZKB2EUE3; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 909105A061C for ; Fri, 17 Oct 2025 02:34:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1760661289; bh=/TE/BWP15KxBqe/WnCTUmUOqJQajvJMBS2CMJQFr1hw=; h=From:To:Cc:Subject:Date:From; b=ZKB2EUE3OuNNseZcfbOlVpIoOGqK7dEelBw9/aYrOWPh4VJ0+HGMuUW30/tN2Gkek X5LAIJTwhadgxBHYks14dwd1ciQBPBpocAlt1NJ8fQgIZNnMWyRxl1zDawSt0AyRx8 X7tGWxAyvWxRhNABUj2+lraiinkPCESiB88IR4c2XNUaBLxvYmrnFa6eqj0MLTzAoO EelrOLVpDdDNFI9SutDJhxxRsDQT4cKaQl1cWMU/otf8xmYdwacCqj8T9USDSlZpjQ q3Ff1Se9CgQ6tVFYap+vOnGoLU8pxjyi5blj1eU6fD6cjAa/uHV+xu61pDsDW4O0yg oIAlisoec+OXw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cnm6x3Pg5z4wDg; Fri, 17 Oct 2025 11:34:49 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 0/3] RFC: Reduce differences between inbound and outbound socket binding Date: Fri, 17 Oct 2025 11:34:44 +1100 Message-ID: <20251017003447.414103-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.51.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 6XT7MG4CZGEIMTOTEABLX3KBZ6SJCCN5 X-Message-ID-Hash: 6XT7MG4CZGEIMTOTEABLX3KBZ6SJCCN5 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Happily there's an approach to tackling bug 100 which also reduces those differences, allowing more code to be shared between the two paths. Amongst other things, this will make the next steps of flexible forwarding configuration easier. Link: https://bugs.passt.top/show_bug.cgi?id=100 David Gibson (3): tcp: Merge tcp_ns_sock_init[46]() into tcp_sock_init_one() udp: Unify some more inbound/outbound parts of udp_sock_init() tcp, udp: Bind outbound listening sockets by interface instead of address conf.c | 4 +-- pif.c | 6 ---- tcp.c | 110 +++++++++++++++------------------------------------------ tcp.h | 5 +-- udp.c | 55 +++++++++++++---------------- udp.h | 5 +-- 6 files changed, 61 insertions(+), 124 deletions(-) -- 2.51.0