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=202504 header.b=m+7k+AEB; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id AB1155A0272 for ; Thu, 10 Apr 2025 09:16:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202504; t=1744269401; bh=BuU8NT03sRECmp3z+kHwFXhnOXjg+2lHWDauTv0Td7s=; h=From:To:Cc:Subject:Date:From; b=m+7k+AEBmSXd++PbtTgYryOA46fdwsiXQ4gP88FDEx5Z8hySIvWwsP0w+s632Kbfe ikPL+dkgfuk0qEJ4cIQAYQsih7PnZ2JRO6UXU4oGJ45d6KVJ50BYwusZoJdfND5tvn wEmNU4W+ojFR4xJPslQ+maNQO17l/G98HGgHcdWrTnjD1oBuqWGHGTrHKRbLLZzPO6 UoxZoxEq33GUl2G4HV0Obj+cgjI8s0N1dvJwBa5hU5qFKWVFWG8CxAzXI7Qawz+oxL 4CnMLeej8ix4vBli3knYsG4Vj+VdnRgFPRJaqDpWphmYR4rUkrcxHPj+jkM4MfbGpG LElbNqimcN4+w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZYB2K4FJ3z4wnp; Thu, 10 Apr 2025 17:16:41 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 0/3] Properly preseve local addresses for UDP flows Date: Thu, 10 Apr 2025 17:16:37 +1000 Message-ID: <20250410071640.2310091-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.49.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 7VX6FRD7KNIM57ZFPEMNYO422SH6CZVT X-Message-ID-Hash: 7VX6FRD7KNIM57ZFPEMNYO422SH6CZVT 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: Add the pieces we need so that we'll reliably send replies from the same local address that the originating datagram was delivered to. Fixes bug 99, and will (I think) be necessary for a bunch more of the flexible forwarding stuff we have in mind. David Gibson (3): udp: Use PKTINFO cmsgs to get destination address for received datagrams inany: Improve ASSERT message for bad socket family udp, udp_flow: Track our specific address on socket interfaces flow.c | 14 +++++++++++--- flow.h | 3 ++- flow_table.h | 1 + inany.h | 3 ++- tcp.c | 2 +- udp.c | 41 +++++++++++++++++++++++++++++++++++++---- udp_flow.c | 36 ++++++++++++++++++++++++++++++++---- udp_flow.h | 3 ++- util.c | 8 ++++++-- util.h | 10 ++++++++++ 10 files changed, 104 insertions(+), 17 deletions(-) -- 2.49.0