summaryrefslogtreecommitdiff
path: root/src/devices/nm-device.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-09-02 19:39:00 +0200
committerLubomir Rintel <lkundrak@v3.sk>2015-09-08 12:32:35 +0200
commit1c46ddf196b1e87782049e8f9ee3ada93e0dc85b (patch)
tree44e289ac5a01a60e314d85904f5ff02d048251f8 /src/devices/nm-device.c
parentda2ae8ce4e6cb03931454d7d6fa94866b03f6be2 (diff)
downloadNetworkManager-1c46ddf196b1e87782049e8f9ee3ada93e0dc85b.tar.gz
device: don't reset NM_UNMANAGED_DEFAULT when platform doesn't override this
This would cause the ip_vti0 generic device (that appears upon insertion of ip_vti module during libreswan ipsec stack init) to go managed and brought UP. Without addresses assigned the device would cause all the VPN traffic to disappear in the oblivion.
Diffstat (limited to 'src/devices/nm-device.c')
-rw-r--r--src/devices/nm-device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index e1e8030b54..f4c1f730d8 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -1129,8 +1129,8 @@ nm_device_finish_init (NMDevice *self)
* Currently it can happen that NM deletes 127.0.0.1 address. */
nm_device_set_initial_unmanaged_flag (self, NM_UNMANAGED_DEFAULT, TRUE);
} else if (priv->platform_link_initialized || (priv->is_nm_owned && nm_device_is_software (self))) {
- nm_platform_link_get_unmanaged (NM_PLATFORM_GET, priv->ifindex, &platform_unmanaged);
- nm_device_set_initial_unmanaged_flag (self, NM_UNMANAGED_DEFAULT, platform_unmanaged);
+ if (nm_platform_link_get_unmanaged (NM_PLATFORM_GET, priv->ifindex, &platform_unmanaged))
+ nm_device_set_initial_unmanaged_flag (self, NM_UNMANAGED_DEFAULT, platform_unmanaged);
} else {
/* Hardware and externally-created software links stay unmanaged
* until they are fully initialized by the platform. NM created