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=DdW/Uz73; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 7540A5A061A for ; Fri, 10 Apr 2026 03:03:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1775782992; bh=rh3rGrutWvI3Sj3svfRdPYLQwfQrXP2gGkI38QC9g7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DdW/Uz73L6/v+xYfFdyMwhnYkWgjPZMuXyf7Ayz05X/iKLRMs2VKq4jBsPMI0ns53 XidHGJ39vYb1ul/g5B7gSs5SKm5TIpP7TKwZk0FlvDxFA9stNkmey18JwacIw7QuCW W4kgstTOBzsY0LIhGz6hQRsyhzjTUh56WpR5gyd2gk4TANeK7/yKsO+7hQV5sPaATf 5X3CL4fok9JYtzkEtIeQ/BjtjdOU14KhB9n2bhSrxSwP5rutTn22oqpypCyOvOOv2a 8dwhUFAGnvZydhO967dsR+SLyGqpXFmjZGeokF7neAd8rDqpFuzMMpmlVIc8/dPEbj h7PgtwSIR9Kkw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4fsJSw6YhSz4wSY; Fri, 10 Apr 2026 11:03:12 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 03/23] conf: Move first pass handling of -[TU] next to handling of -[tu] Date: Fri, 10 Apr 2026 11:02:49 +1000 Message-ID: <20260410010309.736855-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260410010309.736855-1-david@gibson.dropbear.id.au> References: <20260410010309.736855-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: KKS7UWMZEK57SYPZSMNZAJ5HBC3GJNFU X-Message-ID-Hash: KKS7UWMZEK57SYPZSMNZAJ5HBC3GJNFU 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 forwarding options -[tTuU] can't be fully handled in our first pass over the command line options, they need to wait until the second, once we know more about the interface configuration. However, we do need stub handling, so they don't cause an error. For historical reasons the -[TU] options are handled a fair way apart from the -[tu] options. Move them next to each other for clarity. Signed-off-by: David Gibson --- conf.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/conf.c b/conf.c index 7d718f91..f3b36bb6 100644 --- a/conf.c +++ b/conf.c @@ -2024,6 +2024,12 @@ void conf(struct ctx *c, int argc, char **argv) c->one_off = true; break; + case 'T': + case 'U': + if (c->mode != MODE_PASTA) + die("-%c is for pasta mode only", name); + + /* fall through */ case 't': case 'u': /* Handle these later, once addresses are configured */ @@ -2064,13 +2070,6 @@ void conf(struct ctx *c, int argc, char **argv) die("Cannot use DNS address %s", optarg); } break; - case 'T': - case 'U': - if (c->mode != MODE_PASTA) - die("-%c is for pasta mode only", name); - - /* Handle properly later, once addresses are configured */ - break; case 'h': usage(argv[0], stdout, EXIT_SUCCESS); break; -- 2.53.0