about summary refs log tree commit diff
path: root/libnm-core/nm-setting-tun.c
diff options
context:
space:
mode:
authorIain Lane <iain@orangesquash.org.uk>2018-09-24 09:29:55 +0100
committerIain Lane <iain@orangesquash.org.uk>2018-09-24 09:29:55 +0100
commite152ec7bf4ba252ff9d3eb13eabd417b931dac9a (patch)
treec323cf856ee0bb8e44590670dd54c19653a55748 /libnm-core/nm-setting-tun.c
parentee9c73a923909e23a649407be77e25235d769e25 (diff)
Import Upstream version 1.12.2
Diffstat (limited to 'libnm-core/nm-setting-tun.c')
-rw-r--r--libnm-core/nm-setting-tun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm-core/nm-setting-tun.c b/libnm-core/nm-setting-tun.c
index dab407bd..edcb3ffd 100644
--- a/libnm-core/nm-setting-tun.c
+++ b/libnm-core/nm-setting-tun.c
@@ -179,8 +179,8 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
 {
 	NMSettingTunPrivate *priv = NM_SETTING_TUN_GET_PRIVATE (setting);
 
-	if (   priv->mode != NM_SETTING_TUN_MODE_TUN
-	    && priv->mode != NM_SETTING_TUN_MODE_TAP) {
+	if (!NM_IN_SET (priv->mode, NM_SETTING_TUN_MODE_TUN,
+	                            NM_SETTING_TUN_MODE_TAP)) {
 		g_set_error (error,
 		             NM_CONNECTION_ERROR,
 		             NM_CONNECTION_ERROR_INVALID_PROPERTY,