summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-03-22 20:01:09 +0100
committerLubomir Rintel <lkundrak@v3.sk>2019-03-28 16:55:48 +0100
commit045b88a5b5445569246ec45790fdbeaf437759b8 (patch)
tree06585057004199c570511133a70932c8d1bee5f5
parent3a55ec63e1295864ecae7f0975796f7793c3b0aa (diff)
downloadNetworkManager-045b88a5b5445569246ec45790fdbeaf437759b8.tar.gz
ovs: don't traverse interface through disconnected when the ovsdb entry is removed
Go straight to unmanaged. That's what all the other devices do when their backing resources vanish. If the device reached disconnected state, an autoconnect check would try to connect it back, in vain. https://github.com/NetworkManager/NetworkManager/pull/324
-rw-r--r--src/devices/ovs/nm-ovs-factory.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/devices/ovs/nm-ovs-factory.c b/src/devices/ovs/nm-ovs-factory.c
index 766c650bf1..0c85123f81 100644
--- a/src/devices/ovs/nm-ovs-factory.c
+++ b/src/devices/ovs/nm-ovs-factory.c
@@ -120,20 +120,13 @@ ovsdb_device_removed (NMOvsdb *ovsdb, const char *name, NMDeviceType device_type
NMDeviceFactory *self)
{
NMDevice *device;
- NMDeviceState device_state;
device = nm_manager_get_device (nm_manager_get (), name, device_type);
if (!device)
return;
- device_state = nm_device_get_state (device);
if ( device_type == NM_DEVICE_TYPE_OVS_INTERFACE
- && device_state > NM_DEVICE_STATE_DISCONNECTED
- && device_state < NM_DEVICE_STATE_DEACTIVATING) {
- nm_device_state_changed (device,
- NM_DEVICE_STATE_DEACTIVATING,
- NM_DEVICE_STATE_REASON_REMOVED);
- } else if (device_state == NM_DEVICE_STATE_UNMANAGED) {
+ || nm_device_get_state (device) == NM_DEVICE_STATE_UNMANAGED) {
nm_device_unrealize (device, TRUE, NULL);
}
}