Blame SOURCES/0030-device-start-IP-conf-on-master-carrier-up-rh1576254.patch

ede2ca
From 40cd552f21cebe867ada842f6054952a915c9681 Mon Sep 17 00:00:00 2001
ede2ca
From: Beniamino Galvani <bgalvani@redhat.com>
ede2ca
Date: Tue, 8 May 2018 14:05:22 +0200
ede2ca
Subject: [PATCH] device: start IP configuration when master carrier goes up
ede2ca
ede2ca
If the master has no carrier in act_stage3_ip6_config_start(), we set
ede2ca
IP state WAIT and wait until carrier goes up before starting IP
ede2ca
configuration.
ede2ca
ede2ca
However, in carrier_changed() if the device state is ACTIVATED we only
ede2ca
call nm_device_update_dynamic_ip_setup(), which just restarts DHCP if
ede2ca
it was already running.
ede2ca
ede2ca
Let's also ensure that we start IP configuration if the IP state is
ede2ca
WAIT.
ede2ca
ede2ca
Fixes: b0f6baad90a3d8b571a56cc255ad49d9fa26d874
ede2ca
ede2ca
https://bugzilla.redhat.com/show_bug.cgi?id=1575944
ede2ca
(cherry picked from commit 1829126f3abe8af591af2d0906f04b3dae01743e)
ede2ca
(cherry picked from commit f03ae35593f1ac1c1c717ac06b9076ee5e046783)
ede2ca
---
ede2ca
 src/devices/nm-device.c | 12 ++++++------
ede2ca
 1 file changed, 6 insertions(+), 6 deletions(-)
ede2ca
ede2ca
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
ede2ca
index 0e87d3da4..22594872a 100644
ede2ca
--- a/src/devices/nm-device.c
ede2ca
+++ b/src/devices/nm-device.c
ede2ca
@@ -2378,12 +2378,12 @@ carrier_changed (NMDevice *self, gboolean carrier)
ede2ca
 			* is restored. */
ede2ca
 			if (priv->state == NM_DEVICE_STATE_ACTIVATED)
ede2ca
 				nm_device_update_dynamic_ip_setup (self);
ede2ca
-			else {
ede2ca
-				if (nm_device_activate_ip4_state_in_wait (self))
ede2ca
-					nm_device_activate_stage3_ip4_start (self);
ede2ca
-				if (nm_device_activate_ip6_state_in_wait (self))
ede2ca
-					nm_device_activate_stage3_ip6_start (self);
ede2ca
-			}
ede2ca
+			/* If needed, also resume IP configuration that is
ede2ca
+			 * waiting for carrier. */
ede2ca
+			if (nm_device_activate_ip4_state_in_wait (self))
ede2ca
+				nm_device_activate_stage3_ip4_start (self);
ede2ca
+			if (nm_device_activate_ip6_state_in_wait (self))
ede2ca
+				nm_device_activate_stage3_ip6_start (self);
ede2ca
 			return;
ede2ca
 		}
ede2ca
 		/* fall-through and change state of device */
ede2ca
-- 
ede2ca
2.17.0
ede2ca