From f55acd909e371b025b0539a592441bb7d7541303 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 1 Sep 2015 19:44:23 +0300 Subject: [PATCH] FILS: Set FILS Capability bit in management frames from AP If FILS is enabled, indicate that in Beacon, Probe Response, and (Re)Association Response frames in the Extended Capabilities element. Signed-off-by: Jouni Malinen --- src/ap/ieee802_11_shared.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c index 4b5867b2d..b470c6ea4 100644 --- a/src/ap/ieee802_11_shared.c +++ b/src/ap/ieee802_11_shared.c @@ -218,11 +218,19 @@ static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx) if (hapd->conf->ssid.utf8_ssid) *pos |= 0x01; /* Bit 48 - UTF-8 SSID */ break; + case 7: /* Bits 56-63 */ + break; case 8: /* Bits 64-71 */ if (hapd->conf->ftm_responder) *pos |= 0x40; /* Bit 70 - FTM responder */ if (hapd->conf->ftm_initiator) *pos |= 0x80; /* Bit 71 - FTM initiator */ + case 9: /* Bits 72-79 */ +#ifdef CONFIG_FILS + if ((hapd->conf->wpa & WPA_PROTO_RSN) && + wpa_key_mgmt_fils(hapd->conf->wpa_key_mgmt)) + *pos |= 0x01; +#endif /* CONFIG_FILS */ break; } } @@ -258,6 +266,11 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid) if (hapd->conf->mbo_enabled && len < 6) len = 6; #endif /* CONFIG_MBO */ +#ifdef CONFIG_FILS + if ((!(hapd->conf->wpa & WPA_PROTO_RSN) || + !wpa_key_mgmt_fils(hapd->conf->wpa_key_mgmt)) && len < 10) + len = 10; +#endif /* CONFIG_FILS */ if (len < hapd->iface->extended_capa_len) len = hapd->iface->extended_capa_len; if (len == 0)