HS 2.0: Copy Roaming Consortium OI from (Re)AssocReq to Access-Request
This extends hostapd processing of (Re)Association Request frames to store a local copy of the Consortium OI within the Roaming Consortium Selection element, if present, and then add that in HS 2.0 Roaming Consortium attribute into RADIUS Access-Request messages. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
be5acc3884
commit
67cca34645
9 changed files with 38 additions and 0 deletions
|
@ -235,6 +235,14 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
|
|||
elems.hs20_len - 4);
|
||||
} else
|
||||
sta->hs20_ie = NULL;
|
||||
|
||||
wpabuf_free(sta->roaming_consortium);
|
||||
if (elems.roaming_cons_sel)
|
||||
sta->roaming_consortium = wpabuf_alloc_copy(
|
||||
elems.roaming_cons_sel + 4,
|
||||
elems.roaming_cons_sel_len - 4);
|
||||
else
|
||||
sta->roaming_consortium = NULL;
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
#ifdef CONFIG_FST
|
||||
|
|
|
@ -2651,6 +2651,14 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
elems.hs20_len - 4);
|
||||
} else
|
||||
sta->hs20_ie = NULL;
|
||||
|
||||
wpabuf_free(sta->roaming_consortium);
|
||||
if (elems.roaming_cons_sel)
|
||||
sta->roaming_consortium = wpabuf_alloc_copy(
|
||||
elems.roaming_cons_sel + 4,
|
||||
elems.roaming_cons_sel_len - 4);
|
||||
else
|
||||
sta->roaming_consortium = NULL;
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
#ifdef CONFIG_FST
|
||||
|
|
|
@ -712,6 +712,16 @@ void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd,
|
|||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
if (sta->roaming_consortium &&
|
||||
!radius_msg_add_wfa(
|
||||
msg, RADIUS_VENDOR_ATTR_WFA_HS20_ROAMING_CONSORTIUM,
|
||||
wpabuf_head(sta->roaming_consortium),
|
||||
wpabuf_len(sta->roaming_consortium))) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Could not add HS 2.0 Roaming Consortium");
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
|
|
|
@ -321,6 +321,7 @@ 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);
|
||||
wpabuf_free(sta->roaming_consortium);
|
||||
#ifdef CONFIG_FST
|
||||
wpabuf_free(sta->mb_ies);
|
||||
#endif /* CONFIG_FST */
|
||||
|
|
|
@ -182,6 +182,8 @@ struct sta_info {
|
|||
struct wpabuf *wps_ie; /* WPS IE from (Re)Association Request */
|
||||
struct wpabuf *p2p_ie; /* P2P IE from (Re)Association Request */
|
||||
struct wpabuf *hs20_ie; /* HS 2.0 IE from (Re)Association Request */
|
||||
/* Hotspot 2.0 Roaming Consortium from (Re)Association Request */
|
||||
struct wpabuf *roaming_consortium;
|
||||
u8 remediation_method;
|
||||
char *remediation_url; /* HS 2.0 Subscription Remediation Server URL */
|
||||
struct wpabuf *hs20_deauth_req;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue