From cb8c997e487d3ceb8a1990a8acdc5ffd73155f1c Mon Sep 17 00:00:00 2001 From: Shawn Routhier Date: Wed, 17 Dec 2014 18:25:38 -0800 Subject: [master] Print preferred life and max life as unsigned ints [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 | 5 +++++ client/dhc6.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/RELNOTES b/RELNOTES index d7209af3..caeac994 100644 --- 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 diff --git a/client/dhc6.c b/client/dhc6.c index c724b581..04a8fa00 100644 --- a/client/dhc6.c +++ b/client/dhc6.c @@ -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. */ -- cgit v1.2.1