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=202602 header.b=RUFVFyu6; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 422E45A0265 for ; Fri, 17 Apr 2026 07:05:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1776402331; bh=bzMyzMV4WhwzA6YVxHLwz2JfdPWZtkAtXZM8yIF46Qk=; h=From:To:Cc:Subject:Date:From; b=RUFVFyu6qvUWwYwGCxmq31zCfwcskGEYNIC+vCm2duO6HAZz4PkGbCRnCqiVpq3Z8 QzzfxyVoE5/o1zSoNVYpKDP+fp5yLVRlqnadXPx82ZCghoMUf/0xGUpwwwpjLh3xMX l/A7saQCReKgoG2VlGNTAqDnwdGIGG1iYG00rsYLT62ATrPeRqLF1TsPjV1ysaVcXE C3hW1oRc8jInwNpRBa4LwBiC+oL/CkmPRLkubiEB8SaEh15hniCEYWi7mO96tlJQYQ yWYYjqLDnCie+qC/hV5jWVenvQhq3WT8gwKGCTWRVTjT5YinnobmBcexzndz2GrDwr vOP+s5VXjHS7g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4fxjWH6QF6z4wSg; Fri, 17 Apr 2026 15:05:31 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v3 00/11] Rework forwarding option parsing Date: Fri, 17 Apr 2026 15:05:09 +1000 Message-ID: <20260417050520.102247-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.53.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 2PUONUZWA4P57HLXZGPATW7J4ODQF7NG X-Message-ID-Hash: 2PUONUZWA4P57HLXZGPATW7J4ODQF7NG 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: This series makes a number of significant reworks to how we process forwarding options (-t, -u, -T and -U) in passt & pasta. This is largely motivated by moving towards being able to share this code with a configuration update tool. However, along the way it also enables some forwarding configurations that were technically possible with the forwarding table but couldn't be specified on the command line, in particular bug 180. There is still a bunch of work needed to make the parsing code truly shareable with pesto, but this is a solid start. v3: * Removed already merged patches * Further revisions based on Stefano's review, including * Improved example text in manpage and usage * More flexible rule dumping * Re-integrated conflict checking in fwd_rule_add() v2: * Assorted minor changes based on Stefano's review, including * Explicitly state "guest or namespace" in the manpage * Clearer description of @rulesocks field * Worked around a gcc < 15 bug causing a false positive warning * Update man page and usage() for new capabilities * Additional patches moving rule parsing out of conf.c David Gibson (11): doc: Rework man page description of port specifiers conf: Move "all" handling to port specifier conf: Allow user-specified auto-scanned port forwarding ranges conf: Move SO_BINDTODEVICE workaround to conf_ports() conf: Don't pass raw commandline argument to conf_ports_spec() fwd, conf: Add capabilities bits to each forwarding table conf, fwd: Stricter rule checking in fwd_rule_add() fwd_rule: Move ephemeral port probing to fwd_rule.c fwd, conf: Move rule parsing code to fwd_rule.[ch] fwd_rule: Move conflict checking back within fwd_rule_add() fwd: Generalise fwd_rules_info() conf.c | 434 +++-------------------------------------- fwd.c | 142 ++------------ fwd.h | 37 ---- fwd_rule.c | 563 ++++++++++++++++++++++++++++++++++++++++++++++++++--- fwd_rule.h | 68 ++++++- passt.1 | 72 +++++-- 6 files changed, 704 insertions(+), 612 deletions(-) -- 2.53.0