Blame SOURCES/dhcp-dhc6-life.patch

45d60a
From 4d5514f9579197a4200a52332a9047da1424b3ee Mon Sep 17 00:00:00 2001
45d60a
From: Jiri Popelka <jpopelka@redhat.com>
45d60a
Date: Thu, 4 Sep 2014 16:03:38 +0200
45d60a
Subject: [PATCH] [dhclient -6] fix lease time exporting
45d60a
45d60a
addr->preferred_life and addr->max_life are u_int32_t
45d60a
so casting them to (int) causes problems with big values,
45d60a
for example with 'infinity' (0xffffffff), which is
45d60a
then represented as '-1' in dhclient-script.
45d60a
45d60a
Signed-off-by: Jiri Popelka <jpopelka@redhat.com>
45d60a
---
45d60a
 client/dhc6.c | 8 ++++----
45d60a
 1 file changed, 4 insertions(+), 4 deletions(-)
45d60a
45d60a
diff --git a/client/dhc6.c b/client/dhc6.c
45d60a
index c724b58..04a8fa0 100644
45d60a
--- a/client/dhc6.c
45d60a
+++ b/client/dhc6.c
45d60a
@@ -3862,10 +3862,10 @@ dhc6_marshall_values(const char *prefix, struct client_state *client,
45d60a
 		}
45d60a
 		client_envadd(client, prefix, "life_starts", "%d",
45d60a
 			      (int)(addr->starts));
45d60a
-		client_envadd(client, prefix, "preferred_life", "%d",
45d60a
-			      (int)(addr->preferred_life));
45d60a
-		client_envadd(client, prefix, "max_life", "%d",
45d60a
-			      (int)(addr->max_life));
45d60a
+		client_envadd(client, prefix, "preferred_life", "%u",
45d60a
+			      addr->preferred_life);
45d60a
+		client_envadd(client, prefix, "max_life", "%u",
45d60a
+			      addr->max_life);
45d60a
 	}
45d60a
 
45d60a
 	/* ia fields. */
45d60a
-- 
45d60a
2.1.0
45d60a