]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] Print preferred life and max life as unsigned ints
authorShawn Routhier <sar@isc.org>
Thu, 18 Dec 2014 02:30:36 +0000 (18:30 -0800)
committerShawn Routhier <sar@isc.org>
Thu, 18 Dec 2014 02:30:36 +0000 (18:30 -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 f933416020f7e3197ccb1496e153d9b272b05b60..1b8ccd251c45ab38904f454f05bc35580ce71bed 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -165,6 +165,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.1-ESV-R10rc1
 
 - None
index 463e0e535fd3f980044c3813b8fcdd4ebc5af801..614f5da29dee376200d31e2dc540708db70e9a7a 100644 (file)
@@ -3922,10 +3922,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. */