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=202408 header.b=AunDcAEv; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 0553B5A026E for ; Fri, 20 Sep 2024 06:12:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202408; t=1726805566; bh=lNL3cv/pa/5sKvG1wsj9HzzxRXtry2fgwcO4rQ2sQIc=; h=From:To:Cc:Subject:Date:From; b=AunDcAEvYD4SREnbIEFYbTy6ZgE6Bs62DZgfISbHt9py81hQftEbiKFWAPivrYq/R 5sZ67I86otpqcNDhcuXLnPo7w1rsxThmrDb9E4Cr0I9sEBVr73D3uX0HCRA/JR/+iW UlKUAmFB2abuAbgLj6aMqYeajFMdzMx7cJy/AusfRxTi1T54dsJEls1LRuMXLTKXvy s8yLcvHhasY1/xWgSUo9JOTBO0K78A2ztKluiLk1HsxACB9fq1lgARJ//+67K5Tkhh Cw3lyWv49BEgBectG6P6znjp9D1zZYOZtgAqJAmk50ipAHhJzI+7ke31Bgn5wCDDbV fK+ty1e9MY89g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4X8zWL41fnz4xDF; Fri, 20 Sep 2024 14:12:46 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 0/4] Use inany addresses through port forwarding configuration Date: Fri, 20 Sep 2024 14:12:40 +1000 Message-ID: <20240920041244.593192-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.46.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: WGGBSOCA6HPTH52NDMTLSKR7BNXU67MJ X-Message-ID-Hash: WGGBSOCA6HPTH52NDMTLSKR7BNXU67MJ 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: We use inany addresses, which can represent either an IPv4 or IPv6 address heavily through the flow table. However, for the configuration of port forwarding: both the command line parsing and initialization of listening sockets, we use address family+(void *) pairs instead. Using inany through these paths makes them slightly neater now, but more importantly will make it easier to add more robust tracking of forwarding configuration. David Gibson (4): udp: Don't attempt to get dual-stack sockets in nonsensical cases util, pif: Replace sock_l4() with pif_sock_l4() tcp, udp: Make {tcp,udp}_sock_init() take an inany address inany: Add inany_pton() helper conf.c | 23 ++++++++--------------- inany.c | 20 ++++++++++++++++++++ inany.h | 1 + pif.c | 42 ++++++++++++++++++++++++++++++++++++++++++ pif.h | 3 +++ tcp.c | 45 +++++++++++++++++++++++---------------------- tcp.h | 2 +- udp.c | 50 ++++++++++++++++++++++---------------------------- udp.h | 4 ++-- util.c | 52 ---------------------------------------------------- util.h | 3 --- 11 files changed, 122 insertions(+), 123 deletions(-) -- 2.46.1