]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OWE: Fix OWE network profile saving
authorJouni Malinen <j@w1.fi>
Sat, 8 Dec 2018 14:26:17 +0000 (16:26 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 8 Dec 2018 14:27:26 +0000 (16:27 +0200)
key_mgmt=OWE did not have a config parameter writer and wpa_supplicant
was unable to save such a network profile correctly. Fix this by adding
the needed parameter writer.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/config.c

index 0498cdb012ffb43e2cafcefef8e832fe98862b50..90eef9cf1fcc95c2691d2f1be41970d1b7925bc5 100644 (file)
@@ -1055,6 +1055,18 @@ static char * wpa_config_write_key_mgmt(const struct parse_data *data,
        }
 #endif /* CONFIG_DPP */
 
+#ifdef CONFIG_OWE
+       if (ssid->key_mgmt & WPA_KEY_MGMT_OWE) {
+               ret = os_snprintf(pos, end - pos, "%sOWE",
+                                 pos == buf ? "" : " ");
+               if (os_snprintf_error(end - pos, ret)) {
+                       end[-1] = '\0';
+                       return buf;
+               }
+               pos += ret;
+       }
+#endif /* CONFIG_OWE */
+
        if (pos == buf) {
                os_free(buf);
                buf = NULL;