aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11_shared.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-12-17 15:19:34 (GMT)
committerJouni Malinen <j@w1.fi>2016-12-17 20:08:23 (GMT)
commit26bf70e3d2af681e1761b0cee00b9ef4c6f37347 (patch)
treefd686ec90da105cf991cfa99c4268d30e5088900 /src/ap/ieee802_11_shared.c
parent42b847ac1ed656383f13646db84568fb23cd45c4 (diff)
downloadhostap-26bf70e3d2af681e1761b0cee00b9ef4c6f37347.zip
hostap-26bf70e3d2af681e1761b0cee00b9ef4c6f37347.tar.gz
hostap-26bf70e3d2af681e1761b0cee00b9ef4c6f37347.tar.bz2
FILS: Separate FILS realm configuration from ERP domain
The new hostapd configuration parameter fils_realm=<realm> can now be used to configure one or more FILS realms to advertise for ERP domains when using FILS. This replaces the use of erp_domain=<domain> parameter for the FILS use case. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/ieee802_11_shared.c')
-rw-r--r--src/ap/ieee802_11_shared.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
index d20ddc7..daacf7e 100644
--- a/src/ap/ieee802_11_shared.c
+++ b/src/ap/ieee802_11_shared.c
@@ -605,18 +605,23 @@ u8 * hostapd_eid_fils_indic(struct hostapd_data *hapd, u8 *eid, int hessid)
#ifdef CONFIG_FILS
u8 *len;
u16 fils_info = 0;
+ size_t realms;
+ struct fils_realm *realm;
if (!(hapd->conf->wpa & WPA_PROTO_RSN) ||
!wpa_key_mgmt_fils(hapd->conf->wpa_key_mgmt))
return pos;
+ realms = dl_list_len(&hapd->conf->fils_realms);
+ if (realms > 7)
+ realms = 7; /* 3 bit count field limits this to max 7 */
+
*pos++ = WLAN_EID_FILS_INDICATION;
len = pos++;
/* TODO: B0..B2: Number of Public Key Identifiers */
if (hapd->conf->erp_domain) {
- /* TODO: Support for setting multiple domain identifiers */
/* B3..B5: Number of Realm Identifiers */
- fils_info |= BIT(3);
+ fils_info |= realms << 3;
}
/* TODO: B6: FILS IP Address Configuration */
if (hapd->conf->fils_cache_id_set)
@@ -638,8 +643,13 @@ u8 * hostapd_eid_fils_indic(struct hostapd_data *hapd, u8 *eid, int hessid)
os_memcpy(pos, hapd->conf->hessid, ETH_ALEN);
pos += ETH_ALEN;
}
- if (hapd->conf->erp_domain) {
- fils_domain_name_hash(hapd->conf->erp_domain, pos);
+
+ dl_list_for_each(realm, &hapd->conf->fils_realms, struct fils_realm,
+ list) {
+ if (realms == 0)
+ break;
+ realms--;
+ os_memcpy(pos, realm->hash, 2);
pos += 2;
}
*len = pos - len - 1;