HS 2.0: Do not add two copies of OSEN element into Beacon/Probe Resp
OSEN element was getting added both through the Authenticator IEs (before some non-vendor elements) and separately at the end of the frames with other vendor elements. Fix this by removing the separate addition of the OSEN element and by moving the Authenticator IE addition for OSEN to match the design used with WPA so that the vendor element gets added in the proper place in the sequence of IEs. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
81d0759cba
commit
69e8e7817e
1 changed files with 8 additions and 6 deletions
|
@ -456,7 +456,8 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
|
|||
pos = hostapd_eid_ext_supp_rates(hapd, pos);
|
||||
|
||||
/* RSN, MDIE */
|
||||
if (hapd->conf->wpa != WPA_PROTO_WPA)
|
||||
if (!(hapd->conf->wpa == WPA_PROTO_WPA ||
|
||||
(hapd->conf->osen && !hapd->conf->wpa)))
|
||||
pos = hostapd_eid_wpa(hapd, pos, epos - pos);
|
||||
|
||||
pos = hostapd_eid_bss_load(hapd, pos, epos - pos);
|
||||
|
@ -523,7 +524,8 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
|
|||
#endif /* CONFIG_IEEE80211AC */
|
||||
|
||||
/* WPA */
|
||||
if (hapd->conf->wpa == WPA_PROTO_WPA)
|
||||
if (hapd->conf->wpa == WPA_PROTO_WPA ||
|
||||
(hapd->conf->osen && !hapd->conf->wpa))
|
||||
pos = hostapd_eid_wpa(hapd, pos, epos - pos);
|
||||
|
||||
/* Wi-Fi Alliance WMM */
|
||||
|
@ -553,7 +555,6 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
|
|||
|
||||
#ifdef CONFIG_HS20
|
||||
pos = hostapd_eid_hs20_indication(hapd, pos);
|
||||
pos = hostapd_eid_osen(hapd, pos);
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
pos = hostapd_eid_mbo(hapd, pos, (u8 *) resp + buflen - pos);
|
||||
|
@ -1164,7 +1165,8 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
|
|||
tailpos = hostapd_eid_ext_supp_rates(hapd, tailpos);
|
||||
|
||||
/* RSN, MDIE */
|
||||
if (hapd->conf->wpa != WPA_PROTO_WPA)
|
||||
if (!(hapd->conf->wpa == WPA_PROTO_WPA ||
|
||||
(hapd->conf->osen && !hapd->conf->wpa)))
|
||||
tailpos = hostapd_eid_wpa(hapd, tailpos,
|
||||
tail + BEACON_TAIL_BUF_SIZE -
|
||||
tailpos);
|
||||
|
@ -1240,7 +1242,8 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
|
|||
#endif /* CONFIG_IEEE80211AC */
|
||||
|
||||
/* WPA */
|
||||
if (hapd->conf->wpa == WPA_PROTO_WPA)
|
||||
if (hapd->conf->wpa == WPA_PROTO_WPA ||
|
||||
(hapd->conf->osen && !hapd->conf->wpa))
|
||||
tailpos = hostapd_eid_wpa(hapd, tailpos,
|
||||
tail + BEACON_TAIL_BUF_SIZE -
|
||||
tailpos);
|
||||
|
@ -1271,7 +1274,6 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
|
|||
|
||||
#ifdef CONFIG_HS20
|
||||
tailpos = hostapd_eid_hs20_indication(hapd, tailpos);
|
||||
tailpos = hostapd_eid_osen(hapd, tailpos);
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
tailpos = hostapd_eid_mbo(hapd, tailpos, tail + tail_len - tailpos);
|
||||
|
|
Loading…
Reference in a new issue