summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2014-12-17 18:25:38 -0800
committerShawn Routhier <sar@isc.org>2014-12-17 18:25:38 -0800
commitcb8c997e487d3ceb8a1990a8acdc5ffd73155f1c (patch)
treee1979478888392862b3f6747ec1d223a12978bf2
parent992dc76542b7e21f8244e45eaba927fb3a8b8c8e (diff)
downloadisc-dhcp-cb8c997e487d3ceb8a1990a8acdc5ffd73155f1c.tar.gz
[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.
-rw-r--r--RELNOTES5
-rw-r--r--client/dhc6.c8
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. */