summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-06-02 11:11:50 +0200
committerThomas Haller <thaller@redhat.com>2017-06-22 11:35:09 +0200
commit1ffb66288d201e117c81e2176ee73e967f5e1dca (patch)
tree79065bc760c6d077e3e14c1fb57bb7c1d990537a
parent1f5bd29fec0f7be426a519728ea190c925afe1ea (diff)
downloadNetworkManager-1ffb66288d201e117c81e2176ee73e967f5e1dca.tar.gz
device: renew IP addressing on carrier change also for master devices
Commit 348452f1e06e9bde9f84b90db4f5620ee672389a (device: renew DHCP lease for active "ignore-carrier" devices on carrier-on (bgo #743368)) added this behavior for non-master devices. The same reasoning applies here too. https://github.com/NetworkManager/NetworkManager/pull/18 Based-on-patch-by: Nikolay Martynov <mar.kolya@gmail.com>
-rw-r--r--src/devices/nm-device.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index c3469a8895..866879c2fe 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -2253,10 +2253,16 @@ carrier_changed (NMDevice *self, gboolean carrier)
if (!carrier)
return;
- if (nm_device_activate_ip4_state_in_wait (self))
- nm_device_activate_stage3_ip4_start (self);
- if (nm_device_activate_ip6_state_in_wait (self))
- nm_device_activate_stage3_ip6_start (self);
+ /* Force master to retry getting ip addresses when carrier
+ * is restored. */
+ if (priv->state == NM_DEVICE_STATE_ACTIVATED)
+ nm_device_update_dynamic_ip_setup (self);
+ else {
+ if (nm_device_activate_ip4_state_in_wait (self))
+ nm_device_activate_stage3_ip4_start (self);
+ if (nm_device_activate_ip6_state_in_wait (self))
+ nm_device_activate_stage3_ip6_start (self);
+ }
return;
} else if (priv->is_enslaved && !carrier) {