|
|
708502 |
From af9d166197ede942726117965729cf092308f5a8 Mon Sep 17 00:00:00 2001
|
|
|
708502 |
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
|
|
|
708502 |
Date: Wed, 28 May 2014 15:53:17 +0200
|
|
|
708502 |
Subject: [PATCH] dhcp: dhclient v6 stores address lifetimes in different
|
|
|
708502 |
variables (rh #1086237)
|
|
|
708502 |
MIME-Version: 1.0
|
|
|
708502 |
Content-Type: text/plain; charset=UTF-8
|
|
|
708502 |
Content-Transfer-Encoding: 8bit
|
|
|
708502 |
|
|
|
708502 |
It uses 'new_max_life' for valid lifetime and 'new_preferred_life' for
|
|
|
708502 |
preferred lifetime.
|
|
|
708502 |
|
|
|
708502 |
https://bugzilla.redhat.com/show_bug.cgi?id=1086237
|
|
|
708502 |
|
|
|
708502 |
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
|
|
|
708502 |
---
|
|
|
708502 |
src/dhcp-manager/nm-dhcp-client.c | 12 +++++++++---
|
|
|
708502 |
1 file changed, 9 insertions(+), 3 deletions(-)
|
|
|
708502 |
|
|
|
708502 |
diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c
|
|
|
708502 |
index 6cec744..c8a9461 100644
|
|
|
708502 |
--- a/src/dhcp-manager/nm-dhcp-client.c
|
|
|
708502 |
+++ b/src/dhcp-manager/nm-dhcp-client.c
|
|
|
708502 |
@@ -1388,10 +1388,16 @@ ip6_options_to_config (NMDHCPClient *self)
|
|
|
708502 |
|
|
|
708502 |
ip6_config = nm_ip6_config_new ();
|
|
|
708502 |
|
|
|
708502 |
- str = g_hash_table_lookup (priv->options, "new_dhcp_lease_time");
|
|
|
708502 |
+ str = g_hash_table_lookup (priv->options, "new_max_life");
|
|
|
708502 |
if (str) {
|
|
|
708502 |
- address.lifetime = address.preferred = strtoul (str, NULL, 10);
|
|
|
708502 |
- nm_log_info (LOGD_DHCP6, " lease time %d", address.lifetime);
|
|
|
708502 |
+ address.lifetime = strtoul (str, NULL, 10);
|
|
|
708502 |
+ nm_log_info (LOGD_DHCP6, " valid_lft %d", address.lifetime);
|
|
|
708502 |
+ }
|
|
|
708502 |
+
|
|
|
708502 |
+ str = g_hash_table_lookup (priv->options, "new_preferred_life");
|
|
|
708502 |
+ if (str) {
|
|
|
708502 |
+ address.preferred = strtoul (str, NULL, 10);
|
|
|
708502 |
+ nm_log_info (LOGD_DHCP6, " preferred_lft %d", address.preferred);
|
|
|
708502 |
}
|
|
|
708502 |
|
|
|
708502 |
str = g_hash_table_lookup (priv->options, "new_ip6_address");
|
|
|
708502 |
--
|
|
|
708502 |
1.7.11.7
|
|
|
708502 |
|