mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 15:30:14 +01:00
device: explicitly handle unrealized devices in is_available()
Unrealized software devices are always available for activation,
hardware devices never.
In nm_manager_get_best_device_for_activation() we call
nm_device_is_available() on candidate devices. Without this fix, any
unrealized software device would be not considered ready for
activation, which is wrong.
A software device can override the default implementation of
is_available(). For example NMDeviceOvsInterface does that and only
checks the OVSDB is ready.
Fixes: ba86c208e0 ('Revert "core: prevent the activation of unavailable OVS interfaces only"')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2253
This commit is contained in:
parent
96be0cf049
commit
8b26cb35ee
1 changed files with 4 additions and 0 deletions
|
|
@ -9164,6 +9164,10 @@ is_available(NMDevice *self, NMDeviceCheckDevAvailableFlags flags)
|
|||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
|
||||
/* unrealized software devices are always available, hardware devices never */
|
||||
if (!nm_device_is_real(self))
|
||||
return nm_device_is_software(self);
|
||||
|
||||
if (priv->carrier || priv->ignore_carrier)
|
||||
return TRUE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue