Add WLAN-HESSID into RADIUS messages
This adds hostapd support for the new WLAN-HESSID attribute defined in RFC 7268. This attribute contains the HESSID and it is added whenever Interworking is enabled and HESSID is configured. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
69002fb0a8
commit
cdffd72173
3 changed files with 18 additions and 0 deletions
|
@ -435,6 +435,22 @@ int add_common_radius_attr(struct hostapd_data *hapd,
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_INTERWORKING
|
||||
if (hapd->conf->interworking &&
|
||||
!is_zero_ether_addr(hapd->conf->hessid)) {
|
||||
os_snprintf(buf, sizeof(buf), RADIUS_802_1X_ADDR_FORMAT,
|
||||
MAC2STR(hapd->conf->hessid));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
if (!hostapd_config_get_radius_attr(req_attr,
|
||||
RADIUS_ATTR_WLAN_HESSID) &&
|
||||
!radius_msg_add_attr(msg, RADIUS_ATTR_WLAN_HESSID,
|
||||
(u8 *) buf, os_strlen(buf))) {
|
||||
wpa_printf(MSG_ERROR, "Could not add WLAN-HESSID");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_INTERWORKING */
|
||||
|
||||
if (sta && add_common_radius_sta_attr(hapd, req_attr, sta, msg) < 0)
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -235,6 +235,7 @@ static struct radius_attr_type radius_attrs[] =
|
|||
{ RADIUS_ATTR_EAP_KEY_NAME, "EAP-Key-Name", RADIUS_ATTR_HEXDUMP },
|
||||
{ RADIUS_ATTR_MOBILITY_DOMAIN_ID, "Mobility-Domain-Id",
|
||||
RADIUS_ATTR_INT32 },
|
||||
{ RADIUS_ATTR_WLAN_HESSID, "WLAN-HESSID", RADIUS_ATTR_TEXT },
|
||||
};
|
||||
#define RADIUS_ATTRS ARRAY_SIZE(radius_attrs)
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ enum { RADIUS_ATTR_USER_NAME = 1,
|
|||
RADIUS_ATTR_ERROR_CAUSE = 101,
|
||||
RADIUS_ATTR_EAP_KEY_NAME = 102,
|
||||
RADIUS_ATTR_MOBILITY_DOMAIN_ID = 177,
|
||||
RADIUS_ATTR_WLAN_HESSID = 181,
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue