aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ibss_rsn.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-01-10 19:45:44 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-10 19:45:44 (GMT)
commit6f9b5d169638ea9f3ced5aecd6e85a36a0a0de23 (patch)
treec472b77398f83ec8479dcf3b0a2320e7a7c2dd11 /wpa_supplicant/ibss_rsn.c
parentf337f0e9509e645a8732eb1992c8a11c9cff048c (diff)
downloadhostap-6f9b5d169638ea9f3ced5aecd6e85a36a0a0de23.zip
hostap-6f9b5d169638ea9f3ced5aecd6e85a36a0a0de23.tar.gz
hostap-6f9b5d169638ea9f3ced5aecd6e85a36a0a0de23.tar.bz2
IBSS RSN: Check explicitly that WPA auth sm assoc call succeeded
Verify that association processing did not end up freeing the state machine. This should not really happen in practice, but better verify it anyway.
Diffstat (limited to 'wpa_supplicant/ibss_rsn.c')
-rw-r--r--wpa_supplicant/ibss_rsn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index 5c9dfa1..8907600 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -326,9 +326,11 @@ static int ibss_rsn_auth_init(struct ibss_rsn *ibss_rsn,
return -1;
}
- wpa_auth_sm_event(peer->auth, WPA_ASSOC);
+ if (wpa_auth_sm_event(peer->auth, WPA_ASSOC))
+ return -1;
- wpa_auth_sta_associated(ibss_rsn->auth_group, peer->auth);
+ if (wpa_auth_sta_associated(ibss_rsn->auth_group, peer->auth))
+ return -1;
return 0;
}