about summary refs log tree commit diff
path: root/src/core/devices/ovs
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-03-07 21:31:48 +0100
committerMichael Biebl <biebl@debian.org>2022-03-07 21:31:48 +0100
commitb002c8cf4a4edaf7067563fc1d59545b5c88cc99 (patch)
tree6818612f86964c1dd79bb373feb4f443eeb2dd69 /src/core/devices/ovs
parenta31332e76bee4c5977e2ef9daeeddb205bad27ea (diff)
parent4f887bccf1cde84106588536584a2d54a5b4e6e5 (diff)
Update upstream source from tag 'upstream/1.36.2'
Update to upstream version '1.36.2'
with Debian dir ababed5cf88a964e7aac789b48238ba3cf57f0b4
Diffstat (limited to 'src/core/devices/ovs')
-rw-r--r--src/core/devices/ovs/nm-device-ovs-port.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/devices/ovs/nm-device-ovs-port.c b/src/core/devices/ovs/nm-device-ovs-port.c
index 8406c364..116f58c4 100644
--- a/src/core/devices/ovs/nm-device-ovs-port.c
+++ b/src/core/devices/ovs/nm-device-ovs-port.c
@@ -188,8 +188,10 @@ del_iface_cb(GError *error, gpointer user_data)
 static void
 release_slave(NMDevice *device, NMDevice *slave, gboolean configure)
 {
-    NMDeviceOvsPort *self = NM_DEVICE_OVS_PORT(device);
-    bool slave_removed = nm_device_sys_iface_state_get(slave) == NM_DEVICE_SYS_IFACE_STATE_REMOVED;
+    NMDeviceOvsPort *self              = NM_DEVICE_OVS_PORT(device);
+    bool             slave_not_managed = !NM_IN_SET(nm_device_sys_iface_state_get(slave),
+                                        NM_DEVICE_SYS_IFACE_STATE_MANAGED,
+                                        NM_DEVICE_SYS_IFACE_STATE_ASSUME);
 
     _LOGI(LOGD_DEVICE, "releasing ovs interface %s", nm_device_get_ip_iface(slave));
 
@@ -197,7 +199,7 @@ release_slave(NMDevice *device, NMDevice *slave, gboolean configure)
      * removed and thus we're called with configure=FALSE), we still need
      * to make sure its OVSDB entry is gone.
      */
-    if (configure || slave_removed) {
+    if (configure || slave_not_managed) {
         nm_ovsdb_del_interface(nm_ovsdb_get(),
                                nm_device_get_iface(slave),
                                del_iface_cb,