diff options
author | David Bauer <mail@david-bauer.net> | 2020-03-16 03:03:32 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-03-22 11:03:00 +0100 |
commit | 37e7fa38c2ed21ad60f974de6639c170ce4d0212 (patch) | |
tree | 52b12b51cdec02813f8dc36b2e62b08df004c779 /src/supplicant/nm-supplicant-interface.c | |
parent | 11797f4ad4c90015f8be58c6eb301d3eade44f57 (diff) |
nm-supplicant-interface: enable OWE security when transition mode is available
This pull requests sets the OWE flag for an open network advertising an
OWE enabled transition BSSID. This way, hostapd will automatically
connect to the OWE secured BSSID advertised in the transition mode
information element.
Signed-off-by: David Bauer <mail@david-bauer.net>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/442
Diffstat (limited to 'src/supplicant/nm-supplicant-interface.c')
-rw-r--r-- | src/supplicant/nm-supplicant-interface.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index 42179246c8..b9f6e51d2d 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -482,6 +482,7 @@ _bss_info_properties_changed (NMSupplicantInterface *self, const guint8 *arr_data; gsize arr_len; gboolean p_metered; + gboolean p_owe_transition_mode = FALSE; guint32 p_max_rate; gboolean p_max_rate_has; gint64 now_msec = 0; @@ -630,11 +631,18 @@ _bss_info_properties_changed (NMSupplicantInterface *self, guint32 rate; arr_data = g_variant_get_fixed_array (v_v, &arr_len, 1); - nm_wifi_utils_parse_ies (arr_data, arr_len, &rate, &p_metered); + nm_wifi_utils_parse_ies (arr_data, arr_len, &rate, &p_metered, &p_owe_transition_mode); p_max_rate = NM_MAX (p_max_rate, rate); p_max_rate_has = TRUE; g_variant_unref (v_v); + + /* Add OWE Security type if OWE transition mode is available */ + if (p_owe_transition_mode) + bss_info->rsn_flags |= NM_802_11_AP_SEC_KEY_MGMT_OWE; + else + bss_info->rsn_flags &= ~NM_802_11_AP_SEC_KEY_MGMT_OWE; + bss_info->metered = p_metered; } if (p_max_rate_has) |