summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-05-16 11:29:00 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-05-20 09:48:30 +0200
commit401457fcdb32110196bb1d3e07c6e99f9fc2f319 (patch)
tree9938da2fe6714d0bdfc8efffc8f8089c6a56e8bd
parent9b12806878fe6fbceb49914c04254241935c93c8 (diff)
downloadNetworkManager-bg/add-activate-fail-rh1667874.tar.gz
device: don't wait udev for devices created by usbg/add-activate-fail-rh1667874
If we created a software interface it is because we already decided that it should be managed, and so there is no point in waiting udev to check that the interface is not udev-unmanaged. We still wait udev for software interfaces created externally.
-rw-r--r--src/devices/nm-device.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 7757d18cab..b2c063f9ec 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -635,7 +635,8 @@ static void realize_start_setup (NMDevice *self,
gboolean assume_state_guess_assume,
const char *assume_state_connection_uuid,
gboolean set_nm_owned,
- NMUnmanFlagOp unmanaged_user_explicit);
+ NMUnmanFlagOp unmanaged_user_explicit,
+ gboolean nm_created);
static void _set_mtu (NMDevice *self, guint32 mtu);
static void _commit_mtu (NMDevice *self, const NMIP4Config *config);
static void _cancel_activation (NMDevice *self);
@@ -4081,7 +4082,8 @@ nm_device_realize_start (NMDevice *self,
assume_state_guess_assume,
assume_state_connection_uuid,
set_nm_owned,
- unmanaged_user_explicit);
+ unmanaged_user_explicit,
+ FALSE);
return TRUE;
}
@@ -4126,7 +4128,8 @@ nm_device_create_and_realize (NMDevice *self,
plink,
FALSE, /* assume_state_guess_assume */
NULL, /* assume_state_connection_uuid */
- FALSE, NM_UNMAN_FLAG_OP_FORGET);
+ FALSE, NM_UNMAN_FLAG_OP_FORGET,
+ TRUE);
nm_device_realize_finish (self, plink);
if (nm_device_get_managed (self, FALSE)) {
@@ -4256,7 +4259,8 @@ realize_start_setup (NMDevice *self,
gboolean assume_state_guess_assume,
const char *assume_state_connection_uuid,
gboolean set_nm_owned,
- NMUnmanFlagOp unmanaged_user_explicit)
+ NMUnmanFlagOp unmanaged_user_explicit,
+ gboolean nm_created)
{
NMDevicePrivate *priv;
NMDeviceClass *klass;
@@ -4265,6 +4269,7 @@ realize_start_setup (NMDevice *self,
NMDeviceCapabilities capabilities = 0;
NMConfig *config;
guint real_rate;
+ gboolean unmanaged;
/* plink is a NMPlatformLink type, however, we require it to come from the platform
* cache (where else would it come from?). */
@@ -4395,9 +4400,12 @@ realize_start_setup (NMDevice *self,
nm_device_set_unmanaged_by_user_udev (self);
nm_device_set_unmanaged_by_user_conf (self);
+ unmanaged = plink
+ && !plink->initialized
+ && !nm_created;
nm_device_set_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT,
- plink && !plink->initialized);
+ unmanaged);
}
/**