From: Damodaran, Rohit (Contractor) Date: Wed, 5 Dec 2018 11:20:43 +0000 (+0000) Subject: DPP: Support DPP key_mgmt saving to wpa_supplicant configuration X-Git-Tag: hostap_2_8~800 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad6a92472da0e0c90c39e1ebf0e5c1cd277a105f;p=thirdparty%2Fhostap.git DPP: Support DPP key_mgmt saving to wpa_supplicant configuration In the existing code, there was no "DPP" string available to the DPP key management type for configuration parser of wpa supplicant. When the configuration is saved, the key management string was left out from the config file. Fix this by adding support for writing key_mgmt=DPP option. Signed-off-by: Rohit Damodaran --- diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index c43960697..0498cdb01 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -1043,6 +1043,18 @@ static char * wpa_config_write_key_mgmt(const struct parse_data *data, #endif /* CONFIG_IEEE80211R */ #endif /* CONFIG_FILS */ +#ifdef CONFIG_DPP + if (ssid->key_mgmt & WPA_KEY_MGMT_DPP) { + ret = os_snprintf(pos, end - pos, "%sDPP", + pos == buf ? "" : " "); + if (os_snprintf_error(end - pos, ret)) { + end[-1] = '\0'; + return buf; + } + pos += ret; + } +#endif /* CONFIG_DPP */ + if (pos == buf) { os_free(buf); buf = NULL;