about summary refs log tree commit diff
path: root/libnm
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2019-11-06 20:45:33 +0100
committerMichael Biebl <biebl@debian.org>2019-11-06 20:45:33 +0100
commit9c642eac191ef0dce49855d8da0a9e9af18d5113 (patch)
tree3d1c7574a02b28c68dd5f9a7288565c7ea4f0fe0 /libnm
parentd0425f68f7ee83a1dc5a6ad3688627c1b472a58b (diff)
New upstream version 1.20.6 upstream/1.20.6
Diffstat (limited to 'libnm')
-rw-r--r--libnm/libnm.ver5
-rw-r--r--libnm/nm-object.c24
-rw-r--r--libnm/nm-property-docs.xml1
-rw-r--r--libnm/nm-settings-docs.xml1
-rw-r--r--libnm/nm-settings-ifcfg-rh-docs.xml2
5 files changed, 27 insertions, 6 deletions
diff --git a/libnm/libnm.ver b/libnm/libnm.ver
index 51e0d872..be05d647 100644
--- a/libnm/libnm.ver
+++ b/libnm/libnm.ver
@@ -1628,3 +1628,8 @@ global:
 	nm_setting_wireguard_get_ip6_auto_default_route;
 	nm_settings_add_connection2_flags_get_type;
 } libnm_1_18_0;
+
+libnm_1_20_6 {
+global:
+	nm_setting_802_1x_get_optional;
+} libnm_1_20_0;
diff --git a/libnm/nm-object.c b/libnm/nm-object.c
index 0888077b..55c3af4f 100644
--- a/libnm/nm-object.c
+++ b/libnm/nm-object.c
@@ -772,14 +772,24 @@ properties_changed (GDBusProxy *proxy,
 	}
 }
 
-#define HANDLE_TYPE(vtype, ctype, getter) \
-	G_STMT_START { \
+#define HANDLE_TYPE_CHECK(vtype, ctype, getter) \
+	({ \
+		gboolean _success = FALSE; \
+		\
 		if (g_variant_is_of_type (value, vtype)) { \
 			ctype *param = (ctype *) field; \
 			ctype newval = getter (value); \
 			different = *param != newval; \
 			*param = newval; \
-		} else { \
+			_success = TRUE; \
+		} \
+		\
+		_success; \
+	})
+
+#define HANDLE_TYPE(vtype, ctype, getter) \
+	G_STMT_START { \
+		if (!HANDLE_TYPE_CHECK (vtype, ctype, getter)) {\
 			success = FALSE; \
 			goto done; \
 		} \
@@ -891,9 +901,11 @@ demarshal_generic (NMObject *object,
 		NM_PRAGMA_WARNING_REENABLE
 	} else if (pspec->value_type == G_TYPE_INT)
 		HANDLE_TYPE (G_VARIANT_TYPE_INT32, int, g_variant_get_int32);
-	else if (pspec->value_type == G_TYPE_UINT)
-		HANDLE_TYPE (G_VARIANT_TYPE_UINT32, guint, g_variant_get_uint32);
-	else if (pspec->value_type == G_TYPE_INT64)
+	else if (pspec->value_type == G_TYPE_UINT) {
+		if (   !HANDLE_TYPE_CHECK (G_VARIANT_TYPE_UINT32, guint, g_variant_get_uint32)
+		    && !HANDLE_TYPE_CHECK (G_VARIANT_TYPE_UINT16, guint, g_variant_get_uint16))
+			success = FALSE;
+	} else if (pspec->value_type == G_TYPE_INT64)
 		HANDLE_TYPE (G_VARIANT_TYPE_INT64, gint64, g_variant_get_int64);
 	else if (pspec->value_type == G_TYPE_UINT64)
 		HANDLE_TYPE (G_VARIANT_TYPE_UINT64, guint64, g_variant_get_uint64);
diff --git a/libnm/nm-property-docs.xml b/libnm/nm-property-docs.xml
index 1e70dec9..8d0e99a1 100644
--- a/libnm/nm-property-docs.xml
+++ b/libnm/nm-property-docs.xml
@@ -46,6 +46,7 @@
     <property name="domain-suffix-match" name_upper="DOMAIN_SUFFIX_MATCH" type="string" description="Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server.  If a matching dNSName is found, this constraint is met.  If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison." />
     <property name="eap" name_upper="EAP" type="array of string" description="The allowed EAP method to be used when authenticating to the network with 802.1x.  Valid methods are: &quot;leap&quot;, &quot;md5&quot;, &quot;tls&quot;, &quot;peap&quot;, &quot;ttls&quot;, &quot;pwd&quot;, and &quot;fast&quot;.  Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations." />
     <property name="identity" name_upper="IDENTITY" type="string" description="Identity string for EAP authentication methods.  Often the user's user or login name." />
+    <property name="optional" name_upper="OPTIONAL" type="boolean" default="FALSE" description="Whether the 802.1X authentication is optional. If TRUE, the activation will continue even after a timeout or an authentication failure. Setting the property to TRUE is currently allowed only for Ethernet connections. If set to FALSE, the activation can continue only after a successful authentication." />
     <property name="pac-file" name_upper="PAC_FILE" type="string" description="UTF-8 encoded file path containing PAC for EAP-FAST." />
     <property name="password" name_upper="PASSWORD" type="string" description="UTF-8 encoded password used for EAP authentication methods. If both the &quot;password&quot; property and the &quot;password-raw&quot; property are specified, &quot;password&quot; is preferred." />
     <property name="password-flags" name_upper="PASSWORD_FLAGS" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the &quot;password&quot; property." />
diff --git a/libnm/nm-settings-docs.xml b/libnm/nm-settings-docs.xml
index 4cbde994..85e5b7dc 100644
--- a/libnm/nm-settings-docs.xml
+++ b/libnm/nm-settings-docs.xml
@@ -46,6 +46,7 @@
     <property name="domain-suffix-match" name_upper="DOMAIN_SUFFIX_MATCH" type="string" description="Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server.  If a matching dNSName is found, this constraint is met.  If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison." />
     <property name="eap" name_upper="EAP" type="array of string" description="The allowed EAP method to be used when authenticating to the network with 802.1x.  Valid methods are: &quot;leap&quot;, &quot;md5&quot;, &quot;tls&quot;, &quot;peap&quot;, &quot;ttls&quot;, &quot;pwd&quot;, and &quot;fast&quot;.  Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations." />
     <property name="identity" name_upper="IDENTITY" type="string" description="Identity string for EAP authentication methods.  Often the user's user or login name." />
+    <property name="optional" name_upper="OPTIONAL" type="boolean" default="FALSE" description="Whether the 802.1X authentication is optional. If TRUE, the activation will continue even after a timeout or an authentication failure. Setting the property to TRUE is currently allowed only for Ethernet connections. If set to FALSE, the activation can continue only after a successful authentication." />
     <property name="pac-file" name_upper="PAC_FILE" type="string" description="UTF-8 encoded file path containing PAC for EAP-FAST." />
     <property name="password" name_upper="PASSWORD" type="string" description="UTF-8 encoded password used for EAP authentication methods. If both the &quot;password&quot; property and the &quot;password-raw&quot; property are specified, &quot;password&quot; is preferred." />
     <property name="password-flags" name_upper="PASSWORD_FLAGS" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the &quot;password&quot; property." />
diff --git a/libnm/nm-settings-ifcfg-rh-docs.xml b/libnm/nm-settings-ifcfg-rh-docs.xml
index 8bf11594..0ee1d86a 100644
--- a/libnm/nm-settings-ifcfg-rh-docs.xml
+++ b/libnm/nm-settings-ifcfg-rh-docs.xml
@@ -46,6 +46,8 @@ lookaside file, or it can be owned by a secret agent."/>
 <property name="pin-flags" variable="(none)" format="" values="" default="" example="" description="The property is not handled by ifcfg-rh plugin."/>
 <property name="system-ca-certs" variable="(none)" format="" values="" default="" example="" description="The property is not handled by ifcfg-rh plugin."/>
 <property name="auth-timeout" variable="IEEE_8021X_AUTH_TIMEOUT(+)" format="" values="" default="0" example="" description="Timeout in seconds for the 802.1X authentication. Zero means the global default or 25."/>
+<property name="optional" variable="IEEE_8021X_OPTIONAL(+)
+default=no" format="" values="" default="" example="" description="whether the 802.1X authentication is optional"/>
 </setting>
 <setting name="adsl">
 </setting>