WPA: Rename FILS wrapped data
IEEE P802.11az/D2.0 renamed the FILS Wrapped Data element, removing the FILS prefix. Change the code accordingly. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
94773d40fa
commit
e636bc855f
5 changed files with 24 additions and 24 deletions
|
@ -1820,11 +1820,11 @@ void handle_auth_fils(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
FILS_SESSION_LEN);
|
FILS_SESSION_LEN);
|
||||||
os_memcpy(sta->fils_session, elems.fils_session, FILS_SESSION_LEN);
|
os_memcpy(sta->fils_session, elems.fils_session, FILS_SESSION_LEN);
|
||||||
|
|
||||||
/* FILS Wrapped Data */
|
/* Wrapped Data */
|
||||||
if (elems.fils_wrapped_data) {
|
if (elems.wrapped_data) {
|
||||||
wpa_hexdump(MSG_DEBUG, "FILS: Wrapped Data",
|
wpa_hexdump(MSG_DEBUG, "FILS: Wrapped Data",
|
||||||
elems.fils_wrapped_data,
|
elems.wrapped_data,
|
||||||
elems.fils_wrapped_data_len);
|
elems.wrapped_data_len);
|
||||||
if (!pmksa) {
|
if (!pmksa) {
|
||||||
#ifndef CONFIG_NO_RADIUS
|
#ifndef CONFIG_NO_RADIUS
|
||||||
if (!sta->eapol_sm) {
|
if (!sta->eapol_sm) {
|
||||||
|
@ -1834,8 +1834,8 @@ void handle_auth_fils(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"FILS: Forward EAP-Initiate/Re-auth to authentication server");
|
"FILS: Forward EAP-Initiate/Re-auth to authentication server");
|
||||||
ieee802_1x_encapsulate_radius(
|
ieee802_1x_encapsulate_radius(
|
||||||
hapd, sta, elems.fils_wrapped_data,
|
hapd, sta, elems.wrapped_data,
|
||||||
elems.fils_wrapped_data_len);
|
elems.wrapped_data_len);
|
||||||
sta->fils_pending_cb = cb;
|
sta->fils_pending_cb = cb;
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"FILS: Will send Authentication frame once the response from authentication server is available");
|
"FILS: Will send Authentication frame once the response from authentication server is available");
|
||||||
|
@ -1844,8 +1844,8 @@ void handle_auth_fils(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
* to maintain a copy of the EAP-Initiate/Reauth
|
* to maintain a copy of the EAP-Initiate/Reauth
|
||||||
* message. */
|
* message. */
|
||||||
if (fils_pmkid_erp(wpa_auth_sta_key_mgmt(sta->wpa_sm),
|
if (fils_pmkid_erp(wpa_auth_sta_key_mgmt(sta->wpa_sm),
|
||||||
elems.fils_wrapped_data,
|
elems.wrapped_data,
|
||||||
elems.fils_wrapped_data_len,
|
elems.wrapped_data_len,
|
||||||
sta->fils_erp_pmkid) == 0)
|
sta->fils_erp_pmkid) == 0)
|
||||||
sta->fils_erp_pmkid_set = 1;
|
sta->fils_erp_pmkid_set = 1;
|
||||||
return;
|
return;
|
||||||
|
@ -1988,12 +1988,12 @@ prepare_auth_resp_fils(struct hostapd_data *hapd,
|
||||||
wpabuf_put_u8(data, WLAN_EID_EXT_FILS_SESSION);
|
wpabuf_put_u8(data, WLAN_EID_EXT_FILS_SESSION);
|
||||||
wpabuf_put_data(data, sta->fils_session, FILS_SESSION_LEN);
|
wpabuf_put_data(data, sta->fils_session, FILS_SESSION_LEN);
|
||||||
|
|
||||||
/* FILS Wrapped Data */
|
/* Wrapped Data */
|
||||||
if (!pmksa && erp_resp) {
|
if (!pmksa && erp_resp) {
|
||||||
wpabuf_put_u8(data, WLAN_EID_EXTENSION); /* Element ID */
|
wpabuf_put_u8(data, WLAN_EID_EXTENSION); /* Element ID */
|
||||||
wpabuf_put_u8(data, 1 + wpabuf_len(erp_resp)); /* Length */
|
wpabuf_put_u8(data, 1 + wpabuf_len(erp_resp)); /* Length */
|
||||||
/* Element ID Extension */
|
/* Element ID Extension */
|
||||||
wpabuf_put_u8(data, WLAN_EID_EXT_FILS_WRAPPED_DATA);
|
wpabuf_put_u8(data, WLAN_EID_EXT_WRAPPED_DATA);
|
||||||
wpabuf_put_buf(data, erp_resp);
|
wpabuf_put_buf(data, erp_resp);
|
||||||
|
|
||||||
if (fils_rmsk_to_pmk(wpa_auth_sta_key_mgmt(sta->wpa_sm),
|
if (fils_rmsk_to_pmk(wpa_auth_sta_key_mgmt(sta->wpa_sm),
|
||||||
|
|
|
@ -245,9 +245,9 @@ static int ieee802_11_parse_extension(const u8 *pos, size_t elen,
|
||||||
elems->key_delivery = pos;
|
elems->key_delivery = pos;
|
||||||
elems->key_delivery_len = elen;
|
elems->key_delivery_len = elen;
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_EXT_FILS_WRAPPED_DATA:
|
case WLAN_EID_EXT_WRAPPED_DATA:
|
||||||
elems->fils_wrapped_data = pos;
|
elems->wrapped_data = pos;
|
||||||
elems->fils_wrapped_data_len = elen;
|
elems->wrapped_data_len = elen;
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_EXT_FILS_PUBLIC_KEY:
|
case WLAN_EID_EXT_FILS_PUBLIC_KEY:
|
||||||
if (elen < 1)
|
if (elen < 1)
|
||||||
|
|
|
@ -85,7 +85,7 @@ struct ieee802_11_elems {
|
||||||
const u8 *fils_hlp;
|
const u8 *fils_hlp;
|
||||||
const u8 *fils_ip_addr_assign;
|
const u8 *fils_ip_addr_assign;
|
||||||
const u8 *key_delivery;
|
const u8 *key_delivery;
|
||||||
const u8 *fils_wrapped_data;
|
const u8 *wrapped_data;
|
||||||
const u8 *fils_pk;
|
const u8 *fils_pk;
|
||||||
const u8 *fils_nonce;
|
const u8 *fils_nonce;
|
||||||
const u8 *owe_dh;
|
const u8 *owe_dh;
|
||||||
|
@ -138,7 +138,7 @@ struct ieee802_11_elems {
|
||||||
u8 fils_hlp_len;
|
u8 fils_hlp_len;
|
||||||
u8 fils_ip_addr_assign_len;
|
u8 fils_ip_addr_assign_len;
|
||||||
u8 key_delivery_len;
|
u8 key_delivery_len;
|
||||||
u8 fils_wrapped_data_len;
|
u8 wrapped_data_len;
|
||||||
u8 fils_pk_len;
|
u8 fils_pk_len;
|
||||||
u8 owe_dh_len;
|
u8 owe_dh_len;
|
||||||
u8 power_capab_len;
|
u8 power_capab_len;
|
||||||
|
|
|
@ -458,7 +458,7 @@
|
||||||
#define WLAN_EID_EXT_FILS_HLP_CONTAINER 5
|
#define WLAN_EID_EXT_FILS_HLP_CONTAINER 5
|
||||||
#define WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN 6
|
#define WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN 6
|
||||||
#define WLAN_EID_EXT_KEY_DELIVERY 7
|
#define WLAN_EID_EXT_KEY_DELIVERY 7
|
||||||
#define WLAN_EID_EXT_FILS_WRAPPED_DATA 8
|
#define WLAN_EID_EXT_WRAPPED_DATA 8
|
||||||
#define WLAN_EID_EXT_FTM_SYNC_INFO 9
|
#define WLAN_EID_EXT_FTM_SYNC_INFO 9
|
||||||
#define WLAN_EID_EXT_EXTENDED_REQUEST 10
|
#define WLAN_EID_EXT_EXTENDED_REQUEST 10
|
||||||
#define WLAN_EID_EXT_ESTIMATED_SERVICE_PARAMS 11
|
#define WLAN_EID_EXT_ESTIMATED_SERVICE_PARAMS 11
|
||||||
|
|
|
@ -3867,13 +3867,13 @@ struct wpabuf * fils_build_auth(struct wpa_sm *sm, int dh_group, const u8 *md)
|
||||||
wpabuf_put_u8(buf, WLAN_EID_EXT_FILS_SESSION);
|
wpabuf_put_u8(buf, WLAN_EID_EXT_FILS_SESSION);
|
||||||
wpabuf_put_data(buf, sm->fils_session, FILS_SESSION_LEN);
|
wpabuf_put_data(buf, sm->fils_session, FILS_SESSION_LEN);
|
||||||
|
|
||||||
/* FILS Wrapped Data */
|
/* Wrapped Data */
|
||||||
sm->fils_erp_pmkid_set = 0;
|
sm->fils_erp_pmkid_set = 0;
|
||||||
if (erp_msg) {
|
if (erp_msg) {
|
||||||
wpabuf_put_u8(buf, WLAN_EID_EXTENSION); /* Element ID */
|
wpabuf_put_u8(buf, WLAN_EID_EXTENSION); /* Element ID */
|
||||||
wpabuf_put_u8(buf, 1 + wpabuf_len(erp_msg)); /* Length */
|
wpabuf_put_u8(buf, 1 + wpabuf_len(erp_msg)); /* Length */
|
||||||
/* Element ID Extension */
|
/* Element ID Extension */
|
||||||
wpabuf_put_u8(buf, WLAN_EID_EXT_FILS_WRAPPED_DATA);
|
wpabuf_put_u8(buf, WLAN_EID_EXT_WRAPPED_DATA);
|
||||||
wpabuf_put_buf(buf, erp_msg);
|
wpabuf_put_buf(buf, erp_msg);
|
||||||
/* Calculate pending PMKID here so that we do not need to
|
/* Calculate pending PMKID here so that we do not need to
|
||||||
* maintain a copy of the EAP-Initiate/Reauth message. */
|
* maintain a copy of the EAP-Initiate/Reauth message. */
|
||||||
|
@ -4078,16 +4078,16 @@ int fils_process_auth(struct wpa_sm *sm, const u8 *bssid, const u8 *data,
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FILS Wrapped Data */
|
/* Wrapped Data */
|
||||||
if (!sm->cur_pmksa && elems.fils_wrapped_data) {
|
if (!sm->cur_pmksa && elems.wrapped_data) {
|
||||||
u8 rmsk[ERP_MAX_KEY_LEN];
|
u8 rmsk[ERP_MAX_KEY_LEN];
|
||||||
size_t rmsk_len;
|
size_t rmsk_len;
|
||||||
|
|
||||||
wpa_hexdump(MSG_DEBUG, "FILS: Wrapped Data",
|
wpa_hexdump(MSG_DEBUG, "FILS: Wrapped Data",
|
||||||
elems.fils_wrapped_data,
|
elems.wrapped_data,
|
||||||
elems.fils_wrapped_data_len);
|
elems.wrapped_data_len);
|
||||||
eapol_sm_process_erp_finish(sm->eapol, elems.fils_wrapped_data,
|
eapol_sm_process_erp_finish(sm->eapol, elems.wrapped_data,
|
||||||
elems.fils_wrapped_data_len);
|
elems.wrapped_data_len);
|
||||||
if (eapol_sm_failed(sm->eapol))
|
if (eapol_sm_failed(sm->eapol))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue