diff options
author | Thomas Markwalder <tmark@isc.org> | 2017-04-26 14:58:20 -0400 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2017-04-26 14:58:20 -0400 |
commit | 4dcb408d7697283f6e8519b3ae76c27f2215dfe4 (patch) | |
tree | 45cce81e8b6ebc8688d089c4e64f00d2be874135 | |
parent | f591d739ff52b152956bafa4e61bebfe2bf99351 (diff) | |
download | isc-dhcp-4dcb408d7697283f6e8519b3ae76c27f2215dfe4.tar.gz |
[v4_1_esv] dhclient now writes expiry time as an unsigned long to script env
Merged rt43326.
-rw-r--r-- | RELNOTES | 6 | ||||
-rw-r--r-- | client/dhclient.c | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -96,6 +96,12 @@ by Eric Young (eay@cryptsoft.com). supplying the patch. [ISC-Bugs #29108] +- On 64-bit platforms, dhclient now generates the correct value for the + script environment variable, "expiry", the lease expiry value exceeds + 0x7FFFFFFF. Prior to this such values would produce negative values + for expiry in the script environment. + [ISC-Bugs #43326] + Changes since 4.1-ESV-R14b1 - None diff --git a/client/dhclient.c b/client/dhclient.c index aeb1aaf0..ca519a4b 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -3,7 +3,7 @@ DHCP Client. */ /* - * Copyright (c) 2004-2016 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -3326,7 +3326,9 @@ void script_write_params (client, prefix, lease) universes [i], &es, client_option_envadd); } - client_envadd (client, prefix, "expiry", "%d", (int)(lease -> expiry)); + + client_envadd (client, prefix, "expiry", "%lu", + (unsigned long)(lease -> expiry)); } /* |