diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-04-04 19:53:21 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-04-08 09:31:49 +0200 |
commit | 0b51fd64478fd698c2b8f864dc215e16bd0a8325 (patch) | |
tree | 8ec9048029b43909eeccb121ce70171ffaca1bb2 | |
parent | 1ebaf7730a8c599551dc82a11d59e3ee3b6e194c (diff) | |
download | NetworkManager-0b51fd64478fd698c2b8f864dc215e16bd0a8325.tar.gz |
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.
-rw-r--r-- | src/devices/ovs/nm-ovs-factory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/ovs/nm-ovs-factory.c b/src/devices/ovs/nm-ovs-factory.c index 766c650bf1..2124b2a0b1 100644 --- a/src/devices/ovs/nm-ovs-factory.c +++ b/src/devices/ovs/nm-ovs-factory.c @@ -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); } |