aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorShan Palanisamy <shanp@qca.qualcomm.com>2012-02-16 19:32:48 +0200
committerJouni Malinen <j@w1.fi>2012-02-16 19:32:48 +0200
commit31b540ebd5279da9f085bcf2a77ba25e79f0e90e (patch)
treef931df90a309f0cebd398a4941957f31f16a17b7 /hostapd
parent5ed7880d052f3e476baa9ad6a908d834c631201b (diff)
downloadexternal_wpa_supplicant_8_ti-31b540ebd5279da9f085bcf2a77ba25e79f0e90e.zip
external_wpa_supplicant_8_ti-31b540ebd5279da9f085bcf2a77ba25e79f0e90e.tar.gz
external_wpa_supplicant_8_ti-31b540ebd5279da9f085bcf2a77ba25e79f0e90e.tar.bz2
Clear wpa_psk/passphrase when the other option is configured
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 78f1e3d..818c10b 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -1605,6 +1605,8 @@ struct hostapd_config * hostapd_config_read(const char *fname)
} else {
os_free(bss->ssid.wpa_passphrase);
bss->ssid.wpa_passphrase = os_strdup(pos);
+ os_free(bss->ssid.wpa_psk);
+ bss->ssid.wpa_psk = NULL;
}
} else if (os_strcmp(buf, "wpa_psk") == 0) {
os_free(bss->ssid.wpa_psk);
@@ -1620,6 +1622,8 @@ struct hostapd_config * hostapd_config_read(const char *fname)
errors++;
} else {
bss->ssid.wpa_psk->group = 1;
+ os_free(bss->ssid.wpa_passphrase);
+ bss->ssid.wpa_passphrase = NULL;
}
} else if (os_strcmp(buf, "wpa_psk_file") == 0) {
os_free(bss->ssid.wpa_psk_file);