summary refs log tree commit diff
path: root/libnm-core
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-07-25 13:12:18 +0200
committerMichael Biebl <biebl@debian.org>2018-07-25 13:12:18 +0200
commitcaf1db9d6fbc056cc6c76a24574890f6c7895f3d (patch)
treec323cf856ee0bb8e44590670dd54c19653a55748 /libnm-core
parent429393567647935d9123e21fd27a7529d50255eb (diff)
New upstream version 1.12.2 upstream/1.12.2
Diffstat (limited to 'libnm-core')
-rw-r--r--libnm-core/nm-setting-connection.c12
-rw-r--r--libnm-core/nm-version.h6
2 files changed, 13 insertions, 5 deletions
diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c
index 2649838c..689ba794 100644
--- a/libnm-core/nm-setting-connection.c
+++ b/libnm-core/nm-setting-connection.c
@@ -1051,15 +1051,17 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
 		}
 	}
 
-	if (   nm_streq0 (type, NM_SETTING_OVS_PORT_SETTING_NAME)
-	    && !nm_streq0 (slave_type, NM_SETTING_OVS_BRIDGE_SETTING_NAME)) {
+	if (   strcmp (type, NM_SETTING_OVS_PORT_SETTING_NAME) == 0
+	    && slave_type
+	    && strcmp (slave_type, NM_SETTING_OVS_BRIDGE_SETTING_NAME) != 0) {
 		g_set_error (error,
 		             NM_CONNECTION_ERROR,
 		             NM_CONNECTION_ERROR_MISSING_PROPERTY,
-		             _("Only '%s' connections can be enslaved to '%s'"),
+		             _("'%s' connections must be enslaved to '%s', not '%s'"),
 		             NM_SETTING_OVS_PORT_SETTING_NAME,
-		             NM_SETTING_OVS_BRIDGE_SETTING_NAME);
-		g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_TYPE);
+		             NM_SETTING_OVS_BRIDGE_SETTING_NAME,
+		             slave_type);
+		g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_SLAVE_TYPE);
 		return FALSE;
 	}
 
diff --git a/libnm-core/nm-version.h b/libnm-core/nm-version.h
index 0412bc8e..ee6dbc0b 100644
--- a/libnm-core/nm-version.h
+++ b/libnm-core/nm-version.h
@@ -160,4 +160,10 @@
 # define NM_AVAILABLE_IN_1_12
 #endif
 
+#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_12_2
+# define NM_AVAILABLE_IN_1_12_2          G_UNAVAILABLE(1,12,2)
+#else
+# define NM_AVAILABLE_IN_1_12_2
+#endif
+
 #endif  /* NM_VERSION_H */