ovs: fail device only when it's activating

It doesn't make sense to fail a device that is not activating.

Especially, if the device was in state UNMANAGED, it would enter state
FAILED (and then DISCONNECTED) or ACTIVATED (when external or
assumed); both are wrong.

https://bugzilla.redhat.com/show_bug.cgi?id=2077950
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1302
(cherry picked from commit 93372e8100)
(cherry picked from commit 562239779c)
This commit is contained in:
Beniamino Galvani 2022-07-18 10:00:49 +02:00
parent 36cbca83e7
commit b43503b67b

View file

@ -244,7 +244,11 @@ ovsdb_interface_failed(NMOvsdb *ovsdb,
TRUE);
}
nm_device_state_changed(device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_OVSDB_FAILED);
if (nm_device_is_activating(device)) {
nm_device_state_changed(device,
NM_DEVICE_STATE_FAILED,
NM_DEVICE_STATE_REASON_OVSDB_FAILED);
}
}
static void