aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ibss_rsn.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-17 15:39:57 (GMT)
committerJouni Malinen <j@w1.fi>2009-01-17 15:39:57 (GMT)
commit4691fc7bc86a27f105c3b93954630deafff9c6ec (patch)
tree50e0d3dbf01e8d5a959430647ba4ae4ad7dea71d /wpa_supplicant/ibss_rsn.c
parent3146b2b961aa70ea1947de3ce6d321f6a84276f6 (diff)
downloadhostap-4691fc7bc86a27f105c3b93954630deafff9c6ec.zip
hostap-4691fc7bc86a27f105c3b93954630deafff9c6ec.tar.gz
hostap-4691fc7bc86a27f105c3b93954630deafff9c6ec.tar.bz2
IBSS RSN: Set more hardcoded RSN IEs for now
This allows 4-way handshakes to be completed successfully.
Diffstat (limited to 'wpa_supplicant/ibss_rsn.c')
-rw-r--r--wpa_supplicant/ibss_rsn.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index 8329957..892609b 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -86,9 +86,16 @@ static u8 * supp_alloc_eapol(void *ctx, u8 type, const void *data,
static int supp_get_beacon_ie(void *ctx)
{
+ struct ibss_rsn_peer *peer = ctx;
+
wpa_printf(MSG_DEBUG, "SUPP: %s", __func__);
- /* TODO */
- return -1;
+ /* TODO: get correct RSN IE */
+ return wpa_sm_set_ap_rsn_ie(peer->supp,
+ (u8 *) "\x30\x14\x01\x00"
+ "\x00\x0f\xac\x04"
+ "\x01\x00\x00\x0f\xac\x04"
+ "\x01\x00\x00\x0f\xac\x02"
+ "\x00\x00", 22);
}
@@ -159,7 +166,6 @@ int ibss_rsn_supp_init(struct ibss_rsn_peer *peer, const u8 *own_addr,
wpa_sm_set_param(peer->supp, WPA_PARAM_KEY_MGMT, WPA_KEY_MGMT_PSK);
wpa_sm_set_pmk(peer->supp, psk, PMK_LEN);
-#if 0 /* TODO? */
peer->supp_ie_len = sizeof(peer->supp_ie);
if (wpa_sm_set_assoc_wpa_ie_default(peer->supp, peer->supp_ie,
&peer->supp_ie_len) < 0) {
@@ -167,7 +173,6 @@ int ibss_rsn_supp_init(struct ibss_rsn_peer *peer, const u8 *own_addr,
" failed");
return -1;
}
-#endif
wpa_sm_notify_assoc(peer->supp, peer->addr);
@@ -258,10 +263,11 @@ static int ibss_rsn_auth_init(struct ibss_rsn *ibss_rsn,
/* TODO: get peer RSN IE with Probe Request */
if (wpa_validate_wpa_ie(ibss_rsn->auth_group, peer->auth,
- (u8 *) "\x30\x12\x01\x00"
+ (u8 *) "\x30\x14\x01\x00"
"\x00\x0f\xac\x04"
"\x01\x00\x00\x0f\xac\x04"
- "\x01\x00\x00\x0f\xac\x02", 20, NULL, 0) !=
+ "\x01\x00\x00\x0f\xac\x02"
+ "\x00\x00", 22, NULL, 0) !=
WPA_IE_OK) {
wpa_printf(MSG_DEBUG, "AUTH: wpa_validate_wpa_ie() failed");
return -1;