From 06c00e6d930aedb2619d0bd5f770b3062623cec5 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 8 Dec 2018 16:26:17 +0200 Subject: [PATCH] OWE: Fix OWE network profile saving 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 --- wpa_supplicant/config.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 0498cdb01..90eef9cf1 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -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;