ovs: correct the reason for tearing down unexpectedly
If the ovsdb entry gets removed without the device being deactivated, it's because its parent was removed and we should use the DEPENDENCY_FAILED reason. This is important because, with that reason, policy knows not to autoconnect and bring the port that was being removed back.
This commit is contained in:
@@ -132,7 +132,7 @@ ovsdb_device_removed (NMOvsdb *ovsdb, const char *name, NMDeviceType device_type
|
||||
&& device_state < NM_DEVICE_STATE_DEACTIVATING) {
|
||||
nm_device_state_changed (device,
|
||||
NM_DEVICE_STATE_DEACTIVATING,
|
||||
NM_DEVICE_STATE_REASON_REMOVED);
|
||||
NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED);
|
||||
} else if (device_state == NM_DEVICE_STATE_UNMANAGED) {
|
||||
nm_device_unrealize (device, TRUE, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user