aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorDamodaran, Rohit (Contractor) <Rohit_Damodaran@comcast.com>2018-12-05 11:20:43 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-08 14:17:48 (GMT)
commitad6a92472da0e0c90c39e1ebf0e5c1cd277a105f (patch)
treeaabc5b21b7db6b027ffff371382fccb75d4b78ff /wpa_supplicant
parent3a80672e2287673708e9730bcbfb6af573c77c03 (diff)
downloadhostap-ad6a92472da0e0c90c39e1ebf0e5c1cd277a105f.zip
hostap-ad6a92472da0e0c90c39e1ebf0e5c1cd277a105f.tar.gz
hostap-ad6a92472da0e0c90c39e1ebf0e5c1cd277a105f.tar.bz2
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 <Rohit_Damodaran@comcast.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index c439606..0498cdb 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;