device: renew IP addressing on carrier change also for master devices

Commit 348452f1e0 (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>
This commit is contained in:
Thomas Haller 2017-06-02 11:11:50 +02:00
parent e9a917d619
commit b0f6baad90

View file

@ -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) {