]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] dhclient now writes expiry time as an unsigned long to script env
authorThomas Markwalder <tmark@isc.org>
Wed, 26 Apr 2017 18:58:20 +0000 (14:58 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 26 Apr 2017 18:58:20 +0000 (14:58 -0400)
    Merged rt43326.

RELNOTES
client/dhclient.c

index d43b327fa8c307685bdbd0cdf33b781cf10904ae..158eecba23efc5c3cbc2918e91a1c5bbbd233268 100644 (file)
--- 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
 
index aeb1aaf059cfe7e84844f3c597f6d637380f1553..ca519a4b0e837c9c42bebefe6fae64bdb4c8cc9b 100644 (file)
@@ -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));
 }
 
 /*