about summary refs log tree commit diff
path: root/libnm-core/nm-setting.c
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2020-05-19 16:38:36 +0200
committerSebastien Bacher <seb128@ubuntu.com>2020-05-19 17:09:07 +0200
commitccf6dc06bbee82c3d49f451545c5317337e0777e (patch)
treea8fddc8c6e2b3b99bebab1d5bb2a64581eff4bfd /libnm-core/nm-setting.c
parentf109e55ef130ce84054d5ba3acf4b71cd8c7564a (diff)
parent7ffed1e6136de75188f10ba8763bcb942f932f8e (diff)
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
Diffstat (limited to 'libnm-core/nm-setting.c')
-rw-r--r--libnm-core/nm-setting.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c
index b7be9c65..a75302f0 100644
--- a/libnm-core/nm-setting.c
+++ b/libnm-core/nm-setting.c
@@ -151,15 +151,18 @@ _nm_setting_slave_type_is_valid (const char *slave_type, const char **out_port_t
 
 	if (!slave_type)
 		found = FALSE;
-	else if (!strcmp (slave_type, NM_SETTING_BOND_SETTING_NAME))
-		;
-	else if (!strcmp (slave_type, NM_SETTING_BRIDGE_SETTING_NAME))
+	else if (NM_IN_STRSET (slave_type,
+	                       NM_SETTING_BOND_SETTING_NAME,
+	                       NM_SETTING_VRF_SETTING_NAME)) {
+		/* pass */
+	}
+	else if (nm_streq (slave_type, NM_SETTING_BRIDGE_SETTING_NAME))
 		port_type = NM_SETTING_BRIDGE_PORT_SETTING_NAME;
-	else if (!strcmp (slave_type, NM_SETTING_OVS_BRIDGE_SETTING_NAME))
+	else if (nm_streq (slave_type, NM_SETTING_OVS_BRIDGE_SETTING_NAME))
 		port_type = NM_SETTING_OVS_PORT_SETTING_NAME;
-	else if (!strcmp (slave_type, NM_SETTING_OVS_PORT_SETTING_NAME))
+	else if (nm_streq (slave_type, NM_SETTING_OVS_PORT_SETTING_NAME))
 		port_type = NM_SETTING_OVS_INTERFACE_SETTING_NAME;
-	else if (!strcmp (slave_type, NM_SETTING_TEAM_SETTING_NAME))
+	else if (nm_streq (slave_type, NM_SETTING_TEAM_SETTING_NAME))
 		port_type = NM_SETTING_TEAM_PORT_SETTING_NAME;
 	else
 		found = FALSE;