FILS: Pass only IE area to handle_auth_fils()

This function does not need the frame header, so pass in only the IE
area to make it easier to share this for driver-based AP SME handling.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jeffin Mammen 2017-04-23 18:24:38 +03:00 committed by Jouni Malinen
parent 9392859d7b
commit b8a3453aca

View file

@ -1014,12 +1014,11 @@ static void handle_auth_fils_finish(struct hostapd_data *hapd,
const u8 *msk, size_t msk_len); const u8 *msk, size_t msk_len);
static void handle_auth_fils(struct hostapd_data *hapd, struct sta_info *sta, static void handle_auth_fils(struct hostapd_data *hapd, struct sta_info *sta,
const struct ieee80211_mgmt *mgmt, size_t len, const u8 *pos, size_t len, u16 auth_alg,
u16 auth_alg, u16 auth_transaction, u16 auth_transaction, u16 status_code)
u16 status_code)
{ {
u16 resp = WLAN_STATUS_SUCCESS; u16 resp = WLAN_STATUS_SUCCESS;
const u8 *pos, *end; const u8 *end;
struct ieee802_11_elems elems; struct ieee802_11_elems elems;
int res; int res;
struct wpa_ie_data rsn; struct wpa_ie_data rsn;
@ -1028,8 +1027,7 @@ static void handle_auth_fils(struct hostapd_data *hapd, struct sta_info *sta,
if (auth_transaction != 1 || status_code != WLAN_STATUS_SUCCESS) if (auth_transaction != 1 || status_code != WLAN_STATUS_SUCCESS)
return; return;
pos = mgmt->u.auth.variable; end = pos + len;
end = ((const u8 *) mgmt) + len;
wpa_hexdump(MSG_DEBUG, "FILS: Authentication frame fields", wpa_hexdump(MSG_DEBUG, "FILS: Authentication frame fields",
pos, end - pos); pos, end - pos);
@ -1855,8 +1853,9 @@ static void handle_auth(struct hostapd_data *hapd,
#ifdef CONFIG_FILS #ifdef CONFIG_FILS
case WLAN_AUTH_FILS_SK: case WLAN_AUTH_FILS_SK:
case WLAN_AUTH_FILS_SK_PFS: case WLAN_AUTH_FILS_SK_PFS:
handle_auth_fils(hapd, sta, mgmt, len, auth_alg, handle_auth_fils(hapd, sta, mgmt->u.auth.variable,
auth_transaction, status_code); len - IEEE80211_HDRLEN - sizeof(mgmt->u.auth),
auth_alg, auth_transaction, status_code);
return; return;
#endif /* CONFIG_FILS */ #endif /* CONFIG_FILS */
} }