aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2026-04-10 11:02:49 +1000
committerStefano Brivio <sbrivio@redhat.com>2026-04-15 23:31:36 +0200
commit189a3c5b48747e09d952ce80e646c37c3a30f342 (patch)
treea4c1b102fa7d24a364dc21a2640393cab72229cc
parentde8ebc5dd9ce53d632390edf44cabeb04c7e2f98 (diff)
downloadpasst-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.c13
1 files 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;