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