]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Write SAE and FT-SAE key_mgmt to config
authorThomas Pedersen <thomas@noack.us>
Mon, 1 Sep 2014 04:23:34 +0000 (00:23 -0400)
committerJouni Malinen <j@w1.fi>
Sun, 19 Oct 2014 09:58:13 +0000 (12:58 +0300)
This was forgotten when the key_mgmt parser for SAE and FT-SAE was
added.

Signed-off-by: Javier Lopez <jlopex@gmail.com>
Signed-off-by: Jason Mobarak <x@jason.mobarak.name>
Signed-off-by: Thomas Pedersen <thomas@noack.us>
wpa_supplicant/config.c

index d56e2031b86ae1617afb1d266c08aeee28292a1f..4a984354919a1f0dd614d92ad79e34d0a9087464 100644 (file)
@@ -677,6 +677,28 @@ static char * wpa_config_write_key_mgmt(const struct parse_data *data,
        }
 #endif /* CONFIG_WPS */
 
+#ifdef CONFIG_SAE
+       if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
+               ret = os_snprintf(pos, end - pos, "%sSAE",
+                                 pos == buf ? "" : " ");
+               if (ret < 0 || ret >= end - pos) {
+                       end[-1] = '\0';
+                       return buf;
+               }
+               pos += ret;
+       }
+
+       if (ssid->key_mgmt & WPA_KEY_MGMT_FT_SAE) {
+               ret = os_snprintf(pos, end - pos, "%sFT-SAE",
+                                 pos == buf ? "" : " ");
+               if (ret < 0 || ret >= end - pos) {
+                       end[-1] = '\0';
+                       return buf;
+               }
+               pos += ret;
+       }
+#endif /* CONFIG_SAE */
+
        if (pos == buf) {
                os_free(buf);
                buf = NULL;