From 784d2631700528bde2ae85bca1b551c185d9c270 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 23 Jul 2014 14:03:42 -0500 Subject: [PATCH] dhcp: DHCPv6 OtherConf failures should not be fatal OtherConf implies the address has already been delivered via RA, and possibly DNS too, meaning our IP configuration is already good enough. If nothing on the network bothers to reply to our DHCPv6 Information Requests, let's just run with the config we already have instead of tearing down the whole device. --- src/devices/nm-device.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 8078a16bdb..a38506f949 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -3155,10 +3155,17 @@ dhcp6_fail (NMDevice *device, gboolean timeout) NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); dhcp6_cleanup (device, TRUE, FALSE); - if (timeout || (priv->ip6_state == IP_CONF)) - nm_device_activate_schedule_ip6_config_timeout (device); - else if (priv->ip6_state == IP_FAIL) - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); + + if (priv->dhcp6_mode == NM_RDISC_DHCP_LEVEL_MANAGED) { + if (timeout || (priv->ip6_state == IP_CONF)) + nm_device_activate_schedule_ip6_config_timeout (device); + else if (priv->ip6_state == IP_FAIL) + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); + } else { + /* not a hard failure; just live with the RA info */ + if (priv->ip6_state == IP_CONF) + nm_device_activate_schedule_ip6_config_result (device); + } } static void