diff options
author | Michael Cronenworth <mike@cchtml.com> | 2017-03-14 20:50:26 -0500 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-04-15 10:24:53 +0200 |
commit | 8b051bb35e38e468d630431f1f5215a71d6049f6 (patch) | |
tree | 86c0c36c451b632505ca7bf6cb03b96bad58face /src/supplicant/nm-supplicant-config.c | |
parent | fff918ec5aca2e7c3e661fec3f836d4d63f8a09e (diff) | |
download | NetworkManager-8b051bb35e38e468d630431f1f5215a71d6049f6.tar.gz |
supplicant: Initial pmf support (a.k.a. MFP, a.k.a. 802.11w)
https://bugzilla.gnome.org/show_bug.cgi?id=748367
Signed-off-by: Michael Cronenworth <mike@cchtml.com>
Diffstat (limited to 'src/supplicant/nm-supplicant-config.c')
-rw-r--r-- | src/supplicant/nm-supplicant-config.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/supplicant/nm-supplicant-config.c b/src/supplicant/nm-supplicant-config.c index 1f4c74a5f4..0f33f20c5f 100644 --- a/src/supplicant/nm-supplicant-config.c +++ b/src/supplicant/nm-supplicant-config.c @@ -44,6 +44,7 @@ typedef struct { GHashTable *config; GHashTable *blobs; guint32 ap_scan; + guint32 pmf; gboolean fast_required; gboolean dispose_has_run; } NMSupplicantConfigPrivate; @@ -96,6 +97,7 @@ nm_supplicant_config_init (NMSupplicantConfig * self) (GDestroyNotify) blob_free); priv->ap_scan = 1; + priv->pmf = 1; priv->dispose_has_run = FALSE; } @@ -280,6 +282,14 @@ nm_supplicant_config_get_ap_scan (NMSupplicantConfig * self) return NM_SUPPLICANT_CONFIG_GET_PRIVATE (self)->ap_scan; } +guint32 +nm_supplicant_config_get_pmf (NMSupplicantConfig * self) +{ + g_return_val_if_fail (NM_IS_SUPPLICANT_CONFIG (self), 1); + + return NM_SUPPLICANT_CONFIG_GET_PRIVATE (self)->pmf; +} + gboolean nm_supplicant_config_fast_required (NMSupplicantConfig *self) { @@ -467,6 +477,8 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self, else priv->ap_scan = 1; + priv->pmf = 1; + ssid = nm_setting_wireless_get_ssid (setting); if (!nm_supplicant_config_add_option (self, "ssid", (char *) g_bytes_get_data (ssid, NULL), @@ -931,6 +943,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self, if (!add_string_val (self, "0", "eapol_flags", FALSE, NULL, error)) return FALSE; priv->ap_scan = 0; + priv->pmf = 0; } if (!ADD_STRING_LIST_VAL (self, setting, 802_1x, eap_method, eap_methods, "eap", ' ', TRUE, NULL, error)) |