From 3dce85ceb07a6205c51f52592c8d548da475be97 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 20 Jun 2015 22:59:30 +0300 Subject: [PATCH] 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 --- src/ap/ieee802_1x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c index ef2683456..8aaadfeed 100644 --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c @@ -346,7 +346,8 @@ static int add_common_radius_sta_attr_rsn(struct hostapd_data *hapd, 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, hapd->conf->wpa_group); 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 */ - 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) return -1;