aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ibss_rsn.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-01-15 14:55:15 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-15 14:55:15 (GMT)
commit6c9a98a20dfc05b09cd2eace4173ba216cf60799 (patch)
tree012223bad6d8ff7bd70c9e2b19563f7fb34cd60d /wpa_supplicant/ibss_rsn.c
parent50b05780c275d2774d40e58d442dd598ae93b7c0 (diff)
downloadhostap-6c9a98a20dfc05b09cd2eace4173ba216cf60799.zip
hostap-6c9a98a20dfc05b09cd2eace4173ba216cf60799.tar.gz
hostap-6c9a98a20dfc05b09cd2eace4173ba216cf60799.tar.bz2
IBSS RSN: Do not start multiple Auth/Supp for same peer
This avoids an issue when a received EAPOL-Key frame from a peer is initiating IBSS RSN Authenticator and Supplicant for the peer and the following new-STA-in-IBSS event from the driver is adding yet another instance of Authenticator/Supplicant. The EAPOL-Key RX case was already checking whether an instance had been started; the driver new-STA event needs to do same.
Diffstat (limited to 'wpa_supplicant/ibss_rsn.c')
-rw-r--r--wpa_supplicant/ibss_rsn.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index d4894a5..4792ef6 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -361,6 +361,15 @@ int ibss_rsn_start(struct ibss_rsn *ibss_rsn, const u8 *addr)
{
struct ibss_rsn_peer *peer;
+ for (peer = ibss_rsn->peers; peer; peer = peer->next) {
+ if (os_memcmp(addr, peer->addr, ETH_ALEN) == 0) {
+ wpa_printf(MSG_DEBUG, "RSN: IBSS Authenticator and "
+ "Supplicant for peer " MACSTR " already "
+ "running", MAC2STR(addr));
+ return 0;
+ }
+ }
+
wpa_printf(MSG_DEBUG, "RSN: Starting IBSS Authenticator and "
"Supplicant for peer " MACSTR, MAC2STR(addr));