From 189a3c5b48747e09d952ce80e646c37c3a30f342 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 10 Apr 2026 11:02:49 +1000 Subject: conf: Move first pass handling of -[TU] next to handling of -[tu] 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 Signed-off-by: Stefano Brivio --- conf.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/conf.c b/conf.c index 58edebc..2822146 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; -- cgit v1.2.3