mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 10:35:03 +08:00
When operating on one interface only, respect the configured timeout.
This commit is contained in:
parent
ba2c29b403
commit
8d796699f0
9
dhcpcd.c
9
dhcpcd.c
@ -2025,17 +2025,20 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (options & DHCPCD_MASTER)
|
||||
i = if_options->timeout;
|
||||
else
|
||||
i = ifaces->state->options->timeout;
|
||||
if (opt == 0 &&
|
||||
options & DHCPCD_LINK &&
|
||||
!(options & DHCPCD_WAITIP))
|
||||
{
|
||||
syslog(LOG_WARNING, "no interfaces have a carrier");
|
||||
daemonise();
|
||||
} else if (if_options->timeout > 0) {
|
||||
} else if (i > 0) {
|
||||
if (options & DHCPCD_IPV4LL)
|
||||
options |= DHCPCD_TIMEOUT_IPV4LL;
|
||||
add_timeout_sec(if_options->timeout,
|
||||
handle_exit_timeout, NULL);
|
||||
add_timeout_sec(i, handle_exit_timeout, NULL);
|
||||
}
|
||||
}
|
||||
free_options(if_options);
|
||||
|
Loading…
Reference in New Issue
Block a user