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