HS 2.0: Terms and Conditions attributes in Access-Request messages
This extends hostapd with two new configuration parameters (hs20_t_c_filename and hs20_t_c_timestamp) that can be used to specify that the Terms and Conditions attributes are to be added into all Access-Request messages for Hotspot 2.0 STAs. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
c3d45e130a
commit
6cb8f4f382
6 changed files with 47 additions and 0 deletions
|
@ -722,6 +722,31 @@ void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd,
|
|||
"Could not add HS 2.0 Roaming Consortium");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (hapd->conf->t_c_filename) {
|
||||
be32 timestamp;
|
||||
|
||||
if (!radius_msg_add_wfa(
|
||||
msg,
|
||||
RADIUS_VENDOR_ATTR_WFA_HS20_T_C_FILENAME,
|
||||
(const u8 *) hapd->conf->t_c_filename,
|
||||
os_strlen(hapd->conf->t_c_filename))) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Could not add HS 2.0 T&C Filename");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
timestamp = host_to_be32(hapd->conf->t_c_timestamp);
|
||||
if (!radius_msg_add_wfa(
|
||||
msg,
|
||||
RADIUS_VENDOR_ATTR_WFA_HS20_TIMESTAMP,
|
||||
(const u8 *) ×tamp,
|
||||
sizeof(timestamp))) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Could not add HS 2.0 Timestamp");
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue