From ae667c0827e1976cac75d13ef4fc5595fb7fc191 Mon Sep 17 00:00:00 2001 From: Anton Nayshtut Date: Wed, 21 Jan 2015 15:30:48 +0200 Subject: [PATCH] FST: Store MB IEs from (Re)Association Request Signed-off-by: Jouni Malinen --- src/ap/drv_callbacks.c | 8 ++++++++ src/ap/ieee802_11.c | 8 ++++++++ src/ap/sta_info.c | 3 +++ src/ap/sta_info.h | 3 +++ 4 files changed, 22 insertions(+) diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index 6ecd094ac..d94e4f1f4 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -155,6 +155,14 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr, sta->hs20_ie = NULL; #endif /* CONFIG_HS20 */ +#ifdef CONFIG_FST + wpabuf_free(sta->mb_ies); + if (hapd->iface->fst) + sta->mb_ies = mb_ies_by_info(&elems.mb_ies); + else + sta->mb_ies = NULL; +#endif /* CONFIG_FST */ + if (hapd->conf->wpa) { if (ie == NULL || ielen == 0) { #ifdef CONFIG_WPS diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index db20c8679..cd3975d77 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -1535,6 +1535,14 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, sta->hs20_ie = NULL; #endif /* CONFIG_HS20 */ +#ifdef CONFIG_FST + wpabuf_free(sta->mb_ies); + if (hapd->iface->fst) + sta->mb_ies = mb_ies_by_info(&elems.mb_ies); + else + sta->mb_ies = NULL; +#endif /* CONFIG_FST */ + return WLAN_STATUS_SUCCESS; } diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index 20847d582..9a1b55a38 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -296,6 +296,9 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta) wpabuf_free(sta->wps_ie); wpabuf_free(sta->p2p_ie); wpabuf_free(sta->hs20_ie); +#ifdef CONFIG_FST + wpabuf_free(sta->mb_ies); +#endif /* CONFIG_FST */ os_free(sta->ht_capabilities); os_free(sta->vht_capabilities); diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h index 52a9997fe..420d64e57 100644 --- a/src/ap/sta_info.h +++ b/src/ap/sta_info.h @@ -153,6 +153,9 @@ struct sta_info { struct wpabuf *hs20_deauth_req; char *hs20_session_info_url; int hs20_disassoc_timer; +#ifdef CONFIG_FST + struct wpabuf *mb_ies; /* MB IEs from (Re)Association Request */ +#endif /* CONFIG_FST */ struct os_reltime connected_time;