mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 18:28:03 +02:00
core: prevent the activation of unavailable OVS interfaces only
Preventing the activation of unavailable devices for all device types is too aggresive and leads to race conditions, e.g when a non-virtual bond port gets a carrier, preventing the device to be a good candidate for the connection. Instead, enforce this check only on OVS interfaces as NetworkManager just makes sure that ovsdb->ready is set to TRUE. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2139 Fixes:774badb151('core: prevent the activation of unavailable devices') (cherry picked from commita1c05d2ce6) (cherry picked from commitb8ef2a551e) (cherry picked from commit8b39a79621)
This commit is contained in:
parent
33784b8dcc
commit
67e71a9d7f
1 changed files with 10 additions and 4 deletions
|
|
@ -4699,10 +4699,16 @@ found_better:
|
||||||
if (nm_g_hash_table_contains(exclude_devices, device))
|
if (nm_g_hash_table_contains(exclude_devices, device))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!nm_device_is_available(device,
|
/* During startup, NM performs a cleanup of the ovsdb to remove previous entries.
|
||||||
for_user_request
|
* Before the device is suitable for the connection, it must have ovsdb->ready set
|
||||||
? NM_DEVICE_CHECK_DEV_AVAILABLE_FOR_USER_REQUEST
|
* to TRUE. Performing this check in all kind of interfaces is too agressive and leads
|
||||||
: NM_DEVICE_CHECK_DEV_AVAILABLE_NONE))
|
* to race conditions, e.g when a non-virtual bond port gets a carrier, preventing the
|
||||||
|
* device to be a good candidate for the connection. */
|
||||||
|
if (nm_device_get_device_type(device) == NM_DEVICE_TYPE_OVS_INTERFACE
|
||||||
|
&& !nm_device_is_available(device,
|
||||||
|
for_user_request
|
||||||
|
? NM_DEVICE_CHECK_DEV_AVAILABLE_FOR_USER_REQUEST
|
||||||
|
: NM_DEVICE_CHECK_DEV_AVAILABLE_NONE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* determine the priority of this device. Currently, this priority is independent
|
/* determine the priority of this device. Currently, this priority is independent
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue