Blame SOURCES/rh1083624-master-ignore-carrier.patch

94180d
From 0b664ad4a4dc0e8acefdf53f8a9adb12bbd0cd29 Mon Sep 17 00:00:00 2001
94180d
From: Dan Williams <dcbw@redhat.com>
94180d
Date: Wed, 2 Apr 2014 09:15:54 -0500
94180d
Subject: [PATCH] core: fix bug with ignore-carrier and master/slave devices
94180d
 (rh #1083521)
94180d
94180d
Even ignore-carrier devices need to be aware of carrier-up events so
94180d
they can continue DHCP when the link comes up.  They just ignore all
94180d
carrier-down events.
94180d
---
94180d
 src/devices/nm-device.c | 8 +++-----
94180d
 1 file changed, 3 insertions(+), 5 deletions(-)
94180d
94180d
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
94180d
index 7e2f034..0906da3 100644
94180d
--- a/src/devices/nm-device.c
94180d
+++ b/src/devices/nm-device.c
94180d
@@ -1004,19 +1004,17 @@ carrier_changed (NMDevice *device, gboolean carrier)
94180d
 	NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
94180d
 
94180d
 	if (!nm_device_get_managed (device))
94180d
 		return;
94180d
 
94180d
 	nm_device_recheck_available_connections (device);
94180d
 
94180d
-	if (priv->ignore_carrier) {
94180d
-		/* Ignore all carrier-off, and ignore carrier-on on connected devices */
94180d
-		if (!carrier || priv->state > NM_DEVICE_STATE_DISCONNECTED)
94180d
-			return;
94180d
-	}
94180d
+	/* ignore-carrier devices ignore all carrier-down events */
94180d
+	if (priv->ignore_carrier && !carrier)
94180d
+		return;
94180d
 
94180d
 	if (nm_device_is_master (device)) {
94180d
 		/* Bridge/bond/team carrier does not affect its own activation,
94180d
 		 * but when carrier comes on, if there are slaves waiting,
94180d
 		 * it will restart them.
94180d
 		 */
94180d
 		if (!carrier)
94180d
-- 
94180d
1.9.0
94180d