diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-04-10 11:02:49 +1000 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-04-15 23:31:36 +0200 |
| commit | 189a3c5b48747e09d952ce80e646c37c3a30f342 (patch) | |
| tree | a4c1b102fa7d24a364dc21a2640393cab72229cc | |
| parent | de8ebc5dd9ce53d632390edf44cabeb04c7e2f98 (diff) | |
| download | passt-189a3c5b48747e09d952ce80e646c37c3a30f342.tar passt-189a3c5b48747e09d952ce80e646c37c3a30f342.tar.gz passt-189a3c5b48747e09d952ce80e646c37c3a30f342.tar.bz2 passt-189a3c5b48747e09d952ce80e646c37c3a30f342.tar.lz passt-189a3c5b48747e09d952ce80e646c37c3a30f342.tar.xz passt-189a3c5b48747e09d952ce80e646c37c3a30f342.tar.zst passt-189a3c5b48747e09d952ce80e646c37c3a30f342.zip | |
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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | conf.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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; |
