HS 2.0: Add WLAN RADIUS attributes in OSEN case

Previously, the common WLAN-* RADIUS attributes were added only when WPA
or WPA2 was used. These can be of use for OSEN as well, so include them
in that case, too.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-06-20 22:59:30 +03:00
parent efd5d26d33
commit 3dce85ceb0

View file

@ -346,7 +346,8 @@ static int add_common_radius_sta_attr_rsn(struct hostapd_data *hapd,
return -1; return -1;
} }
suite = wpa_cipher_to_suite((hapd->conf->wpa & 0x2) ? suite = wpa_cipher_to_suite(((hapd->conf->wpa & 0x2) ||
hapd->conf->osen) ?
WPA_PROTO_RSN : WPA_PROTO_WPA, WPA_PROTO_RSN : WPA_PROTO_WPA,
hapd->conf->wpa_group); hapd->conf->wpa_group);
if (!hostapd_config_get_radius_attr(req_attr, if (!hostapd_config_get_radius_attr(req_attr,
@ -453,7 +454,7 @@ static int add_common_radius_sta_attr(struct hostapd_data *hapd,
} }
#endif /* CONFIG_IEEE80211R */ #endif /* CONFIG_IEEE80211R */
if (hapd->conf->wpa && sta->wpa_sm && if ((hapd->conf->wpa || hapd->conf->osen) && sta->wpa_sm &&
add_common_radius_sta_attr_rsn(hapd, req_attr, sta, msg) < 0) add_common_radius_sta_attr_rsn(hapd, req_attr, sta, msg) < 0)
return -1; return -1;