aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_ft.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-04-07 14:27:46 (GMT)
committerJouni Malinen <j@w1.fi>2010-04-07 14:27:46 (GMT)
commit738a1cb286ee108f6314e0e2ab799b1a526d81d2 (patch)
tree62777f6177c97a0df27b82ea9ffe0aef0730f2b7 /src/ap/wpa_auth_ft.c
parentb242d398f8b3a84d759f408e8e461b22c8a2407d (diff)
downloadhostap-738a1cb286ee108f6314e0e2ab799b1a526d81d2.zip
hostap-738a1cb286ee108f6314e0e2ab799b1a526d81d2.tar.gz
hostap-738a1cb286ee108f6314e0e2ab799b1a526d81d2.tar.bz2
FT: Do not include RSN IE in (Re)Assoc Resp during initial MD association
RSN IE is only supposed to be included in Reassociation Response frames and only when they are part of a fast BSS transition.
Diffstat (limited to 'src/ap/wpa_auth_ft.c')
-rw-r--r--src/ap/wpa_auth_ft.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
index 2bf646b..0034daf 100644
--- a/src/ap/wpa_auth_ft.c
+++ b/src/ap/wpa_auth_ft.c
@@ -605,8 +605,8 @@ u8 * wpa_sm_write_assoc_resp_ies(struct wpa_state_machine *sm, u8 *pos,
size_t max_len, int auth_alg,
const u8 *req_ies, size_t req_ies_len)
{
- u8 *end, *mdie, *ftie, *rsnie, *r0kh_id, *subelem = NULL;
- size_t mdie_len, ftie_len, rsnie_len, r0kh_id_len, subelem_len = 0;
+ u8 *end, *mdie, *ftie, *rsnie = NULL, *r0kh_id, *subelem = NULL;
+ size_t mdie_len, ftie_len, rsnie_len = 0, r0kh_id_len, subelem_len = 0;
int res;
struct wpa_auth_config *conf;
struct rsn_ftie *_ftie;
@@ -624,13 +624,18 @@ u8 * wpa_sm_write_assoc_resp_ies(struct wpa_state_machine *sm, u8 *pos,
end = pos + max_len;
- /* RSN */
- res = wpa_write_rsn_ie(conf, pos, end - pos, sm->pmk_r1_name);
- if (res < 0)
- return pos;
- rsnie = pos;
- rsnie_len = res;
- pos += res;
+ if (auth_alg == WLAN_AUTH_FT) {
+ /*
+ * RSN (only present if this is a Reassociation Response and
+ * part of a fast BSS transition)
+ */
+ res = wpa_write_rsn_ie(conf, pos, end - pos, sm->pmk_r1_name);
+ if (res < 0)
+ return pos;
+ rsnie = pos;
+ rsnie_len = res;
+ pos += res;
+ }
/* Mobility Domain Information */
res = wpa_write_mdie(conf, pos, end - pos);