about summary refs log tree commit diff
path: root/src/core/devices/ovs
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2021-08-16 09:52:58 +0200
committerMichael Biebl <biebl@debian.org>2021-08-16 09:52:58 +0200
commit4e636b195bda344f34514ebb1a855f99b004164b (patch)
tree8992a936f0a115aa3c60fe5cf8845085aab31f08 /src/core/devices/ovs
parentfac255a528d295b515fdb7867aac5cab8c6f823f (diff)
parentbfe522304da217296e2a61040f58e35ec5d6f3f2 (diff)
Update upstream source from tag 'upstream/1.30.6'
Update to upstream version '1.30.6'
with Debian dir b4583b68cbcf2c2cc2b9687a460901d0ed5f7e42
Diffstat (limited to 'src/core/devices/ovs')
-rw-r--r--src/core/devices/ovs/nm-device-ovs-interface.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/devices/ovs/nm-device-ovs-interface.c b/src/core/devices/ovs/nm-device-ovs-interface.c
index 5d07c211..0a537f7a 100644
--- a/src/core/devices/ovs/nm-device-ovs-interface.c
+++ b/src/core/devices/ovs/nm-device-ovs-interface.c
@@ -78,6 +78,15 @@ is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
 }
 
 static gboolean
+can_auto_connect(NMDevice *device, NMSettingsConnection *sett_conn, char **specific_object)
+{
+    NMDeviceOvsInterface *       self = NM_DEVICE_OVS_INTERFACE(device);
+    NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE(self);
+
+    return nm_ovsdb_is_ready(priv->ovsdb);
+}
+
+static gboolean
 check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error)
 {
     NMSettingOvsInterface *s_ovs_iface;
@@ -427,6 +436,7 @@ nm_device_ovs_interface_class_init(NMDeviceOvsInterfaceClass *klass)
     device_class->connection_type_check_compatible = NM_SETTING_OVS_INTERFACE_SETTING_NAME;
     device_class->link_types = NM_DEVICE_DEFINE_LINK_TYPES(NM_LINK_TYPE_OPENVSWITCH);
 
+    device_class->can_auto_connect                    = can_auto_connect;
     device_class->can_update_from_platform_link       = can_update_from_platform_link;
     device_class->deactivate                          = deactivate;
     device_class->deactivate_async                    = deactivate_async;