summaryrefslogtreecommitdiff
path: root/src/nm-manager.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-10-25 15:27:57 +0200
committerThomas Haller <thaller@redhat.com>2016-10-28 16:44:57 +0200
commitc0d249b733325046ca192d112d468b86aac54ba4 (patch)
treef386dae6a9b7a2e509c6c693d4f45aa6908d901a /src/nm-manager.c
parent7b7c653c4f812f0ede676e8e0a08aa750e9e30b5 (diff)
downloadNetworkManager-c0d249b733325046ca192d112d468b86aac54ba4.tar.gz
device: delay evaluating unmanaged-by-user-settings flags until link initialized
Before the link is initialized, that is before UDEV completed initializing the device, we should not evaluate the user-settings unmanaged flags. The reason is, that evaluating it likely involves looking at the permanent MAC address, which might use the wrong fake MAC address (before UDEV set the right one). Also, it might use the wrong ifname to lookup the permanent MAC address via ethtool.
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r--src/nm-manager.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 21387a182d..556ae32e9d 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -1331,11 +1331,10 @@ system_unmanaged_devices_changed_cb (NMSettings *settings,
{
NMManager *self = NM_MANAGER (user_data);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
- const GSList *unmanaged_specs, *iter;
+ const GSList *iter;
- unmanaged_specs = nm_settings_get_unmanaged_specs (priv->settings);
for (iter = priv->devices; iter; iter = g_slist_next (iter))
- nm_device_set_unmanaged_by_user_settings (NM_DEVICE (iter->data), unmanaged_specs);
+ nm_device_set_unmanaged_by_user_settings (NM_DEVICE (iter->data));
}
static void
@@ -2004,7 +2003,7 @@ add_device (NMManager *self, NMDevice *device, GError **error)
type_desc = nm_device_get_type_desc (device);
g_assert (type_desc);
- nm_device_set_unmanaged_by_user_settings (device, nm_settings_get_unmanaged_specs (priv->settings));
+ nm_device_set_unmanaged_by_user_settings (device);
nm_device_set_unmanaged_flags (device,
NM_UNMANAGED_SLEEPING,
@@ -2880,15 +2879,15 @@ unmanaged_to_disconnected (NMDevice *device)
if (nm_device_get_state (device) == NM_DEVICE_STATE_UNMANAGED) {
nm_device_state_changed (device,
- NM_DEVICE_STATE_UNAVAILABLE,
- NM_DEVICE_STATE_REASON_USER_REQUESTED);
+ NM_DEVICE_STATE_UNAVAILABLE,
+ NM_DEVICE_STATE_REASON_USER_REQUESTED);
}
if ( nm_device_is_available (device, NM_DEVICE_CHECK_DEV_AVAILABLE_FOR_USER_REQUEST)
&& (nm_device_get_state (device) == NM_DEVICE_STATE_UNAVAILABLE)) {
nm_device_state_changed (device,
- NM_DEVICE_STATE_DISCONNECTED,
- NM_DEVICE_STATE_REASON_USER_REQUESTED);
+ NM_DEVICE_STATE_DISCONNECTED,
+ NM_DEVICE_STATE_REASON_USER_REQUESTED);
}
}