aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
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 /hostapd
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 'hostapd')
-rw-r--r--hostapd/config_file.c26
-rw-r--r--hostapd/hostapd.conf7
2 files changed, 33 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index d9fdd20..32ae688 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2017,6 +2017,29 @@ static int parse_wpabuf_hex(int line, const char *name, struct wpabuf **buf,
}
+#ifdef CONFIG_FILS
+static int parse_fils_realm(struct hostapd_bss_config *bss, const char *val)
+{
+ struct fils_realm *realm;
+ size_t len;
+
+ len = os_strlen(val);
+ realm = os_zalloc(sizeof(*realm) + len + 1);
+ if (!realm)
+ return -1;
+
+ os_memcpy(realm->realm, val, len);
+ if (fils_domain_name_hash(val, realm->hash) < 0) {
+ os_free(realm);
+ return -1;
+ }
+ dl_list_add_tail(&bss->fils_realms, &realm->list);
+
+ return 0;
+}
+#endif /* CONFIG_FILS */
+
+
static int hostapd_config_fill(struct hostapd_config *conf,
struct hostapd_bss_config *bss,
const char *buf, char *pos, int line)
@@ -3577,6 +3600,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
bss->fils_cache_id_set = 1;
+ } else if (os_strcmp(buf, "fils_realm") == 0) {
+ if (parse_fils_realm(bss, pos) < 0)
+ return 1;
#endif /* CONFIG_FILS */
} else if (os_strcmp(buf, "multicast_to_unicast") == 0) {
bss->multicast_to_unicast = atoi(pos);
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index 1fd4fcc..e68874a 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -1309,6 +1309,13 @@ own_ip_addr=127.0.0.1
# FILS Cache Identifier (16-bit value in hexdump format)
#fils_cache_id=0011
+# FILS Realm Information
+# One or more FILS realms need to be configured when FILS is enabled. This list
+# of realms is used to define which realms (used in keyName-NAI by the client)
+# can be used with FILS shared key authentication for ERP.
+#fils_realm=example.com
+#fils_realm=example.org
+
##### IEEE 802.11r configuration ##############################################
# Mobility Domain identifier (dot11FTMobilityDomainID, MDID)