From: Thomas Markwalder Date: Wed, 26 Apr 2017 18:58:20 +0000 (-0400) Subject: [v4_1_esv] dhclient now writes expiry time as an unsigned long to script env X-Git-Tag: v4_1_esv_r15b1~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4dcb408d7697283f6e8519b3ae76c27f2215dfe4;p=thirdparty%2Fdhcp.git [v4_1_esv] dhclient now writes expiry time as an unsigned long to script env Merged rt43326. --- diff --git a/RELNOTES b/RELNOTES index d43b327fa..158eecba2 100644 --- a/RELNOTES +++ b/RELNOTES @@ -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 aeb1aaf05..ca519a4b0 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)); } /*