ovs: improve disconnecting devices after removal from ovsdb

Sometimes during boot the device starts an activation with reason
'assumed', then the ovs interfaces gets removed from the ovsdb. At
this point the device has an active-connection associated; it has the
activate_stage1_device_prepare() activation source scheduled, but it
is still in disconnected state.

Currently the factory doesn't recognizes that the device is activating
and allows the device to proceed even if the interface was removed
from the ovsdb. Fix this by checking the presence of an
active-connection instead.
This commit is contained in:
Beniamino Galvani 2021-01-19 17:40:57 +01:00
parent 31d0a9524d
commit 6d195f7a3f

View file

@ -176,7 +176,7 @@ ovsdb_device_removed(NMOvsdb * ovsdb,
device_state = nm_device_get_state(device);
if (device_type == NM_DEVICE_TYPE_OVS_INTERFACE && device_state > NM_DEVICE_STATE_DISCONNECTED
if (device_type == NM_DEVICE_TYPE_OVS_INTERFACE && nm_device_get_act_request(device)
&& device_state < NM_DEVICE_STATE_DEACTIVATING) {
nm_device_state_changed(device,
NM_DEVICE_STATE_DEACTIVATING,