]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FILS: Add support to write FILS key_mgmt values in network blocks
authorvamsi krishna <vamsin@qti.qualcomm.com>
Thu, 6 Apr 2017 16:19:34 +0000 (21:49 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 7 Apr 2017 13:12:41 +0000 (16:12 +0300)
Add support to write FILS related key_mgmt values also while saving a
network block.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/config.c

index 8bfb6a18215c39594668411fbd2c1e58fd006092..9e54f6cadcfe233f059df0e248edfacd2deb362e 100644 (file)
@@ -938,6 +938,47 @@ static char * wpa_config_write_key_mgmt(const struct parse_data *data,
        }
 #endif /* CONFIG_SUITEB192 */
 
+#ifdef CONFIG_FILS
+       if (ssid->key_mgmt & WPA_KEY_MGMT_FILS_SHA256) {
+               ret = os_snprintf(pos, end - pos, "%sFILS-SHA256",
+                                 pos == buf ? "" : " ");
+               if (os_snprintf_error(end - pos, ret)) {
+                       end[-1] = '\0';
+                       return buf;
+               }
+               pos += ret;
+       }
+       if (ssid->key_mgmt & WPA_KEY_MGMT_FILS_SHA384) {
+               ret = os_snprintf(pos, end - pos, "%sFILS-SHA384",
+                                 pos == buf ? "" : " ");
+               if (os_snprintf_error(end - pos, ret)) {
+                       end[-1] = '\0';
+                       return buf;
+               }
+               pos += ret;
+       }
+#ifdef CONFIG_IEEE80211R
+       if (ssid->key_mgmt & WPA_KEY_MGMT_FT_FILS_SHA256) {
+               ret = os_snprintf(pos, end - pos, "%sFT-FILS-SHA256",
+                                 pos == buf ? "" : " ");
+               if (os_snprintf_error(end - pos, ret)) {
+                       end[-1] = '\0';
+                       return buf;
+               }
+               pos += ret;
+       }
+       if (ssid->key_mgmt & WPA_KEY_MGMT_FT_FILS_SHA384) {
+               ret = os_snprintf(pos, end - pos, "%sFT-FILS-SHA384",
+                                 pos == buf ? "" : " ");
+               if (os_snprintf_error(end - pos, ret)) {
+                       end[-1] = '\0';
+                       return buf;
+               }
+               pos += ret;
+       }
+#endif /* CONFIG_IEEE80211R */
+#endif /* CONFIG_FILS */
+
        if (pos == buf) {
                os_free(buf);
                buf = NULL;