summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2019-06-20 10:14:58 -0400
committerThomas Markwalder <tmark@isc.org>2019-06-20 10:14:58 -0400
commitda31a3401cf3bc5a6b3be84cd6c96ec3c7a902d1 (patch)
tree9b4cd98483cf944627b9af3b1849440cfbf2a52e
parentc3724cc19f7aa06d5ff14730aa2f01dd790163f9 (diff)
downloadisc-dhcp-da31a3401cf3bc5a6b3be84cd6c96ec3c7a902d1.tar.gz
[v4_1_esv] Corrected dhclient command line parsing of --dad-wait-time
Merges in rt46535
-rw-r--r--RELNOTES6
-rw-r--r--client/dhclient.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/RELNOTES b/RELNOTES
index f063cf47..4eadf767 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -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 */