conf: Don't ignore -t and -u options after -D
f6d5a52392
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:f6d5a52392
("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>
This commit is contained in:
parent
c16141eda5
commit
baba284912
1 changed files with 2 additions and 2 deletions
4
conf.c
4
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) &&
|
if (dns4 - &c->ip4.dns[0] < ARRAY_SIZE(c->ip4.dns) &&
|
||||||
inet_pton(AF_INET, optarg, &dns4_tmp)) {
|
inet_pton(AF_INET, optarg, &dns4_tmp)) {
|
||||||
add_dns4(c, &dns4_tmp, &dns4);
|
add_dns4(c, &dns4_tmp, &dns4);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dns6 - &c->ip6.dns[0] < ARRAY_SIZE(c->ip6.dns) &&
|
if (dns6 - &c->ip6.dns[0] < ARRAY_SIZE(c->ip6.dns) &&
|
||||||
inet_pton(AF_INET6, optarg, &dns6_tmp)) {
|
inet_pton(AF_INET6, optarg, &dns6_tmp)) {
|
||||||
add_dns6(c, &dns6_tmp, &dns6);
|
add_dns6(c, &dns6_tmp, &dns6);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
die("Cannot use DNS address %s", optarg);
|
die("Cannot use DNS address %s", optarg);
|
||||||
|
|
Loading…
Reference in a new issue