about summary refs log tree commit diff
path: root/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-02-07 02:40:03 +0100
committerMichael Biebl <biebl@debian.org>2018-02-07 02:40:03 +0100
commit77dfac263f463c1cdb8afb9b8c79a4e83bf08cd8 (patch)
treee5288440b22e159a601450c2e5d40b013bdb4aa0 /src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
parent3d9525cb641ac53c6d36bf5312710c22ae4bd926 (diff)
parent50f6b47074e01dffb8dc536c0a20961dcf28ae9b (diff)
Update upstream source from tag 'upstream/1.10.4'
Update to upstream version '1.10.4'
with Debian dir d2c0f877c591b3125f4e0cfcc711c04669d8d62b
Diffstat (limited to 'src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c')
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index b9900eec..bdd3ee0a 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -294,6 +294,23 @@ make_connection_setting (const char *file,
 	check_if_team_slave (ifcfg, s_con);
 
 	nm_clear_g_free (&value);
+	v = svGetValueStr (ifcfg, "OVS_PORT_UUID", &value);
+	if (!v)
+		v = svGetValueStr (ifcfg, "OVS_PORT", &value);
+	if (v) {
+		const char *old_value;
+
+		if ((old_value = nm_setting_connection_get_master (s_con))) {
+			PARSE_WARNING ("Already configured as slave of %s. Ignoring OVS_PORT=\"%s\"",
+			               old_value, v);
+		} else {
+			g_object_set (s_con, NM_SETTING_CONNECTION_MASTER, v, NULL);
+			g_object_set (s_con, NM_SETTING_CONNECTION_SLAVE_TYPE,
+			              NM_SETTING_OVS_PORT_SETTING_NAME, NULL);
+		}
+	}
+
+	nm_clear_g_free (&value);
 	v = svGetValueStr (ifcfg, "GATEWAY_PING_TIMEOUT", &value);
 	if (v) {
 		gint64 tmp;