]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Print preferred life and max life as unsigned ints
authorShawn Routhier <sar@isc.org>
Thu, 18 Dec 2014 02:25:38 +0000 (18:25 -0800)
committerShawn Routhier <sar@isc.org>
Thu, 18 Dec 2014 02:25:38 +0000 (18:25 -0800)
    [rt37084]

    Change how we print the preferred_live and max_life variables
    into envvironment strings in the client code from being a signed
    int to an unsigned int.

RELNOTES
client/dhc6.c

index d7209af35ecf8ae732a4a11f69156e3b87764109..caeac9943d646cf650aaaae110afd16bf33e9c2a 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -209,6 +209,11 @@ by Eric Young (eay@cryptsoft.com).
   files.
   [ISC-Bugs #38078]
 
+- In the client code change the way preferred_life and max_life are printed
+  for environment variables to be unsigned rather than signed.
+  Thanks to Jiri Popelka at Red Hat for the bug report and patch.
+  [ISC-Bugs #37084]
+
                        Changes since 4.3.1b1
 
 - Modify the linux and openwrt dhclient scripts to process information
index c724b5816658a342a8a4616cb6536dad0fbf72a8..04a8fa0086bd310621ec92ad6eab273ee277e323 100644 (file)
@@ -3862,10 +3862,10 @@ dhc6_marshall_values(const char *prefix, struct client_state *client,
                }
                client_envadd(client, prefix, "life_starts", "%d",
                              (int)(addr->starts));
-               client_envadd(client, prefix, "preferred_life", "%d",
-                             (int)(addr->preferred_life));
-               client_envadd(client, prefix, "max_life", "%d",
-                             (int)(addr->max_life));
+               client_envadd(client, prefix, "preferred_life", "%u",
+                             addr->preferred_life);
+               client_envadd(client, prefix, "max_life", "%u",
+                             addr->max_life);
        }
 
        /* ia fields. */