summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-05-08 14:05:22 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2018-05-09 14:20:02 +0200
commit1829126f3abe8af591af2d0906f04b3dae01743e (patch)
tree8f17ef08f2f7196d57ddf96a44ee3594923220bc /src
parent8e066af7d54fc9249d3ecd1ccdc52b4be7c2d177 (diff)
downloadNetworkManager-1829126f3abe8af591af2d0906f04b3dae01743e.tar.gz
device: start IP configuration when master carrier goes up
If the master has no carrier in act_stage3_ip6_config_start(), we set IP state WAIT and wait until carrier goes up before starting IP configuration. However, in carrier_changed() if the device state is ACTIVATED we only call nm_device_update_dynamic_ip_setup(), which just restarts DHCP if it was already running. Let's also ensure that we start IP configuration if the IP state is WAIT. Fixes: b0f6baad90a3d8b571a56cc255ad49d9fa26d874 https://bugzilla.redhat.com/show_bug.cgi?id=1575944
Diffstat (limited to 'src')
-rw-r--r--src/devices/nm-device.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 02f631761a..ed63adf548 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -3093,12 +3093,12 @@ carrier_changed (NMDevice *self, gboolean 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);
- }
+ /* If needed, also resume IP configuration that is
+ * waiting for carrier. */
+ 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;
}
/* fall-through and change state of device */