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=PX+cnl9G; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 26C105A026F for ; Wed, 22 Oct 2025 05:15:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1761102929; bh=hRaAVCiEzuu16116trdEHLjyJ2XIn0zbDa/KjfLNs18=; h=From:To:Cc:Subject:Date:From; b=PX+cnl9GZ6f5V/rsdbZne9fK8zTUemQguLnCvM23rtwEMG4mLCWGeRbwJwspyqgc4 dBdRW6CFtlAhASlpB5oF8CspSUCgo2RlrL0f2WQQR28aDGfApsoaXfbB0f4+8LUvcR kgc6LsHQeYOLn9Y5OawaNKSQgBKgckEiY0MF/1axBEf0y//jTJWm1/mgSJ0IDeUTbD Sl0txZ7f/XbGvNtcCHI408U0PCk8DjP6ZOALPoFccyfCJ/p59za52/2WJiB9AoxQC4 Osgv9GuPTbB564fBA02Dr5kQqqdkfcA2H8Ro7IZ4rYzYOpHNYJTCGfJtA9FQv95xh3 k6yX/nb4UEYkA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4crvS10m49z4w9V; Wed, 22 Oct 2025 14:15:29 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 0/3] Reduce differences between inbound and outbound socket binding Date: Wed, 22 Oct 2025 14:15:24 +1100 Message-ID: <20251022031527.990033-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: SFIDW7A7OZXBX6Z3QOEBIOKORLZCEXOB X-Message-ID-Hash: SFIDW7A7OZXBX6Z3QOEBIOKORLZCEXOB 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 v2: - Some rearrangements and rewordings for clarity 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 | 114 +++++++++++++++++---------------------------------------- tcp.h | 5 ++- udp.c | 60 +++++++++++++++--------------- udp.h | 5 ++- 6 files changed, 70 insertions(+), 124 deletions(-) -- 2.51.0