aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2018-04-23 21:05:44 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-23 21:35:47 (GMT)
commit8760b9848cf43185f93c1f4d19798c0d9c835922 (patch)
tree72ac02ad8af4ee0383ad9b1ac236cea6a0c690b1 /hostapd
parent6cb8f4f382d8f08461d6bbd457acb059672aaacf (diff)
downloadhostap-8760b9848cf43185f93c1f4d19798c0d9c835922.zip
hostap-8760b9848cf43185f93c1f4d19798c0d9c835922.tar.gz
hostap-8760b9848cf43185f93c1f4d19798c0d9c835922.tar.bz2
HS 2.0: Send Terms and Conditions Acceptance notification
This extends hostapd Access-Accept processing to check if the RADIUS server indicated that Terms and Conditions Acceptance is required. The new hs20_t_c_server_url parameter is used to specify the server URL template that the STA is requested to visit. This commit does not enable any kind of filtering, i.e., only the part of forwarding a request from Access-Accept to the STA using WNM-Notification is covered. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c3
-rw-r--r--hostapd/hostapd.conf7
2 files changed, 10 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index c611551..bd52f4a 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3634,6 +3634,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
bss->t_c_filename = os_strdup(pos);
} else if (os_strcmp(buf, "hs20_t_c_timestamp") == 0) {
bss->t_c_timestamp = strtol(pos, NULL, 0);
+ } else if (os_strcmp(buf, "hs20_t_c_server_url") == 0) {
+ os_free(bss->t_c_server_url);
+ bss->t_c_server_url = os_strdup(pos);
#endif /* CONFIG_HS20 */
#ifdef CONFIG_MBO
} else if (os_strcmp(buf, "mbo") == 0) {
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index f65c004..b5a2718 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -2169,6 +2169,13 @@ own_ip_addr=127.0.0.1
# of seconds since January 1, 1970 00:00 UTC showing the time when the file was
# last modified.
#hs20_t_c_timestamp=1234567
+#
+# hs20_t_c_server_url contains a template for the Terms and Conditions server
+# URL. This template is used to generate the URL for a STA that needs to
+# acknowledge Terms and Conditions.
+# Macros:
+# @1@ = MAC address of the STA (colon separated hex octets)
+#hs20_t_c_server_url=https://example.com/t_and_c?addr=@1@&ap=123
# OSU and Operator icons
# <Icon Width>:<Icon Height>:<Language code>:<Icon Type>:<Name>:<file path>