diff options
| author | Jouni Malinen <jouni@qca.qualcomm.com> | 2013-11-29 14:56:11 +0200 |
|---|---|---|
| committer | Steve Kondik <shade@chemlab.org> | 2014-06-12 14:08:00 -0700 |
| commit | 6c450db6dec07816f8650329b42fef93a0533fc4 (patch) | |
| tree | 993af31878b260ab67fadf7f5f9270274f2960db | |
| parent | 858ba4b93826f1ad233569442664da2e3613f6a3 (diff) | |
| download | android_external_wpa_supplicant_8-6c450db6dec07816f8650329b42fef93a0533fc4.tar.gz android_external_wpa_supplicant_8-6c450db6dec07816f8650329b42fef93a0533fc4.tar.bz2 android_external_wpa_supplicant_8-6c450db6dec07816f8650329b42fef93a0533fc4.zip | |
WPS: Remove old duplicate network even if key is different
Previously, WPS credential provisioning removed duplicated network
entries only if they had identicical SSID, security parameters, and the
keys. However, it is possible that the AP has changes its keys and
leaving the old entry behind can result in connectibity issues (e.g.,
with 4-way handshake failing due to use of the old PSK). Fix this by
allowing the old network entry to be removed even if the keys
(passphrase, PSK, WEP keys) are different.
CRs-Fixed: 611698
Git-commit: c511b321f38957cdece4739968c97a1be001b8ca
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: Ie4dbeb41c3404249803627a208519917f98a4129
| -rw-r--r-- | wpa_supplicant/wps_supplicant.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c index f6c2fcb5..fca69254 100644 --- a/wpa_supplicant/wps_supplicant.c +++ b/wpa_supplicant/wps_supplicant.c @@ -260,31 +260,6 @@ static void wpas_wps_remove_dup_network(struct wpa_supplicant *wpa_s, ssid->group_cipher != new_ssid->group_cipher) continue; - if (ssid->passphrase && new_ssid->passphrase) { - if (os_strlen(ssid->passphrase) != - os_strlen(new_ssid->passphrase)) - continue; - if (os_strcmp(ssid->passphrase, new_ssid->passphrase) != - 0) - continue; - } else if (ssid->passphrase || new_ssid->passphrase) - continue; - - if ((ssid->psk_set || new_ssid->psk_set) && - os_memcmp(ssid->psk, new_ssid->psk, sizeof(ssid->psk)) != 0) - continue; - - if (ssid->auth_alg == WPA_ALG_WEP) { - if (ssid->wep_tx_keyidx != new_ssid->wep_tx_keyidx) - continue; - if (os_memcmp(ssid->wep_key, new_ssid->wep_key, - sizeof(ssid->wep_key))) - continue; - if (os_memcmp(ssid->wep_key_len, new_ssid->wep_key_len, - sizeof(ssid->wep_key_len))) - continue; - } - /* Remove the duplicated older network entry. */ wpa_printf(MSG_DEBUG, "Remove duplicate network %d", ssid->id); wpas_notify_network_removed(wpa_s, ssid); |
