diff options
author | Thomas Markwalder <tmark@isc.org> | 2019-06-20 10:14:58 -0400 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2019-06-20 10:14:58 -0400 |
commit | da31a3401cf3bc5a6b3be84cd6c96ec3c7a902d1 (patch) | |
tree | 9b4cd98483cf944627b9af3b1849440cfbf2a52e | |
parent | c3724cc19f7aa06d5ff14730aa2f01dd790163f9 (diff) | |
download | isc-dhcp-da31a3401cf3bc5a6b3be84cd6c96ec3c7a902d1.tar.gz |
[v4_1_esv] Corrected dhclient command line parsing of --dad-wait-time
Merges in rt46535
-rw-r--r-- | RELNOTES | 6 | ||||
-rw-r--r-- | client/dhclient.c | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -72,6 +72,12 @@ We welcome comments from DHCP users, about this or anything else we do. Email Vicky Risk, Product Manager at vicky@isc.org or discuss on dhcp-users@lists.isc.org. + Changes since 4.1-ESV-R15 + +- 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.1-ESV-R15b1 - None diff --git a/client/dhclient.c b/client/dhclient.c index 590fe8da..7d560d61 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -359,9 +359,11 @@ 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]); } #endif /* DHCPv6 */ |