summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-01-14 20:39:33 +0100
committerLubomir Rintel <lkundrak@v3.sk>2016-01-14 21:00:59 +0100
commit3dc28b2b235e5e4d044c17521a5585bce8f3b76c (patch)
treede2142555a3791545e3a722dbe40d2394e921390
parentac457aa32277e48bc473ff5bc37c6ef76200b7de (diff)
downloadNetworkManager-3dc28b2b235e5e4d044c17521a5585bce8f3b76c.tar.gz
device: don't progress to ip-check if the DHCPv6 is still pending
-rw-r--r--src/devices/nm-device.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 70412b733a..a078da6344 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -6633,20 +6633,23 @@ activate_stage5_ip6_config_commit (NMDevice *self)
}
if (ip6_config_merge_and_apply (self, TRUE, &reason)) {
- /* If IPv6 wasn't the first IP to complete, and DHCP was used,
- * then ensure dispatcher scripts get the DHCP lease information.
- */
- if ( priv->dhcp6_client
- && nm_device_activate_ip6_state_in_conf (self)
- && (nm_device_get_state (self) > NM_DEVICE_STATE_IP_CONFIG)) {
- /* Notify dispatcher scripts of new DHCP6 config */
- nm_dispatcher_call (DISPATCHER_ACTION_DHCP6_CHANGE,
- nm_device_get_settings_connection (self),
- nm_device_get_applied_connection (self),
- self,
- NULL,
- NULL,
- NULL);
+ if ( priv->dhcp6_mode != NM_RDISC_DHCP_LEVEL_NONE
+ && priv->ip6_state == IP_CONF) {
+ if (priv->dhcp6_ip6_config) {
+ /* If IPv6 wasn't the first IP to complete, and DHCP was used,
+ * then ensure dispatcher scripts get the DHCP lease information.
+ */
+ nm_dispatcher_call (DISPATCHER_ACTION_DHCP6_CHANGE,
+ nm_device_get_settings_connection (self),
+ nm_device_get_applied_connection (self),
+ self,
+ NULL,
+ NULL,
+ NULL);
+ } else {
+ /* still waiting for first dhcp6 lease. */
+ return;
+ }
}
/* Enter the IP_CHECK state if this is the first method to complete */