aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-08-14 14:30:35 +1000
committerStefano Brivio <sbrivio@redhat.com>2024-08-14 09:14:12 +0200
commitbaba2849126500eca86a1c93c4f04940e5af1b62 (patch)
tree08c82e6c158c63735eebf234e0be0b68c26cfd83 /conf.c
parentc16141eda5e8473a11ffbca82e1d6142d463300c (diff)
downloadpasst-baba2849126500eca86a1c93c4f04940e5af1b62.tar
passt-baba2849126500eca86a1c93c4f04940e5af1b62.tar.gz
passt-baba2849126500eca86a1c93c4f04940e5af1b62.tar.bz2
passt-baba2849126500eca86a1c93c4f04940e5af1b62.tar.lz
passt-baba2849126500eca86a1c93c4f04940e5af1b62.tar.xz
passt-baba2849126500eca86a1c93c4f04940e5af1b62.tar.zst
passt-baba2849126500eca86a1c93c4f04940e5af1b62.zip
conf: Don't ignore -t and -u options after -D
f6d5a5239264 moved handling of -D into a later loop. However as a side effect it moved this from a switch block to an if block. I left a couple of 'break' statements that don't make sense in the new context. They should be 'continue' so that we go onto the next option, rather than leaving the loop entirely. Fixes: f6d5a5239264 ("conf: Delay handling -D option until after addresses are configured") Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index 76d37da..ed097bd 100644
--- a/conf.c
+++ b/conf.c
@@ -1682,13 +1682,13 @@ void conf(struct ctx *c, int argc, char **argv)
if (dns4 - &c->ip4.dns[0] < ARRAY_SIZE(c->ip4.dns) &&
inet_pton(AF_INET, optarg, &dns4_tmp)) {
add_dns4(c, &dns4_tmp, &dns4);
- break;
+ continue;
}
if (dns6 - &c->ip6.dns[0] < ARRAY_SIZE(c->ip6.dns) &&
inet_pton(AF_INET6, optarg, &dns6_tmp)) {
add_dns6(c, &dns6_tmp, &dns6);
- break;
+ continue;
}
die("Cannot use DNS address %s", optarg);