Blame SOURCES/0004-device-don-t-reset-NM_UNMANAGED_DEFAULT-when-platfor.patch

ab7d06
From e10a8f1f375c9ff669a14674e14f9789b2f321b6 Mon Sep 17 00:00:00 2001
ab7d06
From: Lubomir Rintel <lkundrak@v3.sk>
ab7d06
Date: Wed, 2 Sep 2015 19:39:00 +0200
ab7d06
Subject: [PATCH 4/4] device: don't reset NM_UNMANAGED_DEFAULT when platform
ab7d06
 doesn't override this
ab7d06
ab7d06
This would cause the ip_vti0 generic device (that appears upon insertion of
ab7d06
ip_vti module during libreswan ipsec stack init) to go managed and brought UP.
ab7d06
Without addresses assigned the device would cause all the VPN traffic to
ab7d06
disappear in the oblivion.
ab7d06
ab7d06
(cherry picked from commit 1c46ddf196b1e87782049e8f9ee3ada93e0dc85b)
ab7d06
---
ab7d06
 src/devices/nm-device.c | 4 ++--
ab7d06
 1 file changed, 2 insertions(+), 2 deletions(-)
ab7d06
ab7d06
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
ab7d06
index 5889582..b4e9252 100644
ab7d06
--- a/src/devices/nm-device.c
ab7d06
+++ b/src/devices/nm-device.c
ab7d06
@@ -1158,8 +1158,8 @@ nm_device_finish_init (NMDevice *self)
ab7d06
 			 * Currently it can happen that NM deletes 127.0.0.1 address. */
ab7d06
 			nm_device_set_initial_unmanaged_flag (self, NM_UNMANAGED_DEFAULT, TRUE);
ab7d06
 		} else if (priv->platform_link_initialized || (priv->is_nm_owned && nm_device_is_software (self))) {
ab7d06
-			nm_platform_link_get_unmanaged (NM_PLATFORM_GET, priv->ifindex, &platform_unmanaged);
ab7d06
-			nm_device_set_initial_unmanaged_flag (self, NM_UNMANAGED_DEFAULT, platform_unmanaged);
ab7d06
+			if (nm_platform_link_get_unmanaged (NM_PLATFORM_GET, priv->ifindex, &platform_unmanaged))
ab7d06
+				nm_device_set_initial_unmanaged_flag (self, NM_UNMANAGED_DEFAULT, platform_unmanaged);
ab7d06
 		} else {
ab7d06
 			/* Hardware and externally-created software links stay unmanaged
ab7d06
 			 * until they are fully initialized by the platform. NM created
ab7d06
-- 
ab7d06
2.4.3
ab7d06