aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2018-04-23 18:10:52 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-23 21:35:47 (GMT)
commit6cb8f4f382d8f08461d6bbd457acb059672aaacf (patch)
treede2e1c75f80c712434bb808b7e8f140f5c27e031 /hostapd
parentc3d45e130a4863725d3e230a4991dfa3a8320789 (diff)
downloadhostap-6cb8f4f382d8f08461d6bbd457acb059672aaacf.zip
hostap-6cb8f4f382d8f08461d6bbd457acb059672aaacf.tar.gz
hostap-6cb8f4f382d8f08461d6bbd457acb059672aaacf.tar.bz2
HS 2.0: Terms and Conditions attributes in Access-Request messages
This extends hostapd with two new configuration parameters (hs20_t_c_filename and hs20_t_c_timestamp) that can be used to specify that the Terms and Conditions attributes are to be added into all Access-Request messages for Hotspot 2.0 STAs. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c5
-rw-r--r--hostapd/hostapd.conf12
2 files changed, 17 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index f327cff..c611551 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3629,6 +3629,11 @@ static int hostapd_config_fill(struct hostapd_config *conf,
bss->subscr_remediation_url = os_strdup(pos);
} else if (os_strcmp(buf, "subscr_remediation_method") == 0) {
bss->subscr_remediation_method = atoi(pos);
+ } else if (os_strcmp(buf, "hs20_t_c_filename") == 0) {
+ os_free(bss->t_c_filename);
+ 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);
#endif /* CONFIG_HS20 */
#ifdef CONFIG_MBO
} else if (os_strcmp(buf, "mbo") == 0) {
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index 2206256..f65c004 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -2158,6 +2158,18 @@ own_ip_addr=127.0.0.1
# channels 36-48):
#hs20_operating_class=5173
+# Terms and Conditions information
+#
+# hs20_t_c_filename contains the Terms and Conditions filename that the AP
+# indicates in RADIUS Access-Request messages.
+#hs20_t_c_filename=terms-and-conditions
+#
+# hs20_t_c_timestamp contains the Terms and Conditions timestamp that the AP
+# indicates in RADIUS Access-Request messages. Usually, this contains the number
+# of seconds since January 1, 1970 00:00 UTC showing the time when the file was
+# last modified.
+#hs20_t_c_timestamp=1234567
+
# OSU and Operator icons
# <Icon Width>:<Icon Height>:<Language code>:<Icon Type>:<Name>:<file path>
#hs20_icon=32:32:eng:image/png:icon32:/tmp/icon32.png