]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0: Add WLAN RADIUS attributes in OSEN case
authorJouni Malinen <j@w1.fi>
Sat, 20 Jun 2015 19:59:30 +0000 (22:59 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 20 Jun 2015 20:04:32 +0000 (23:04 +0300)
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>
src/ap/ieee802_1x.c

index ef2683456f1858a2c5e3e7ab7b6f4e492fbf45b9..8aaadfeed3b0983fd882a80466a767ec003fe3d2 100644 (file)
@@ -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;