Commit 83f1dd95 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[master] Corrected dhclient command line parsing of --dad-wait-time

    Merges in rt46535
parent 3e88222f
......@@ -198,6 +198,10 @@ dhcp-users@lists.isc.org.
--decline-wait-time <seconds>. A value of zero equates to no wait at all.
[ISC-Bugs #45457]
- Corrected dhclient command line parsing for --dad-wait-time that causes
even valid values to fail as invalid on some environments.
[ISC-Bugs #46535]
Changes since 4.3.0 (bug fixes)
- Tidy up several small tickets.
......
......@@ -495,9 +495,12 @@ main(int argc, char **argv) {
if (++i == argc) {
usage(use_noarg, argv[i-1]);
}
errno = 0;
dad_wait_time = (int)strtol(argv[i], &s, 10);
if (errno || (*s != '\0') || (dad_wait_time < 0)) {
usage("Invalid value for --dad-wait-time: %s", argv[i]);
usage("Invalid value for --dad-wait-time: %s",
argv[i]);
}
} else if (!strcmp(argv[i], "--prefix-len-hint")) {
if (++i == argc) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment