Blob Blame History Raw
From 0b664ad4a4dc0e8acefdf53f8a9adb12bbd0cd29 Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
Date: Wed, 2 Apr 2014 09:15:54 -0500
Subject: [PATCH] core: fix bug with ignore-carrier and master/slave devices
 (rh #1083521)

Even ignore-carrier devices need to be aware of carrier-up events so
they can continue DHCP when the link comes up.  They just ignore all
carrier-down events.
---
 src/devices/nm-device.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 7e2f034..0906da3 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -1004,19 +1004,17 @@ carrier_changed (NMDevice *device, gboolean carrier)
 	NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
 
 	if (!nm_device_get_managed (device))
 		return;
 
 	nm_device_recheck_available_connections (device);
 
-	if (priv->ignore_carrier) {
-		/* Ignore all carrier-off, and ignore carrier-on on connected devices */
-		if (!carrier || priv->state > NM_DEVICE_STATE_DISCONNECTED)
-			return;
-	}
+	/* ignore-carrier devices ignore all carrier-down events */
+	if (priv->ignore_carrier && !carrier)
+		return;
 
 	if (nm_device_is_master (device)) {
 		/* Bridge/bond/team carrier does not affect its own activation,
 		 * but when carrier comes on, if there are slaves waiting,
 		 * it will restart them.
 		 */
 		if (!carrier)
-- 
1.9.0