aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-12-08 22:15:04 (GMT)
committerJouni Malinen <j@w1.fi>2011-12-08 22:15:04 (GMT)
commit505a36941ef559e7f911102b593d9f0c0ff29fb1 (patch)
tree933084aff8007eaa2076bce4b0a7a113ca2cf5e0 /hostapd
parent219fd441fde553aa1667f190f68dc2a64ea818fd (diff)
downloadhostap-505a36941ef559e7f911102b593d9f0c0ff29fb1.zip
hostap-505a36941ef559e7f911102b593d9f0c0ff29fb1.tar.gz
hostap-505a36941ef559e7f911102b593d9f0c0ff29fb1.tar.bz2
Add MSK dump mechanism into hostapd RADIUS server for testing
Testing code can now be enabled in the hostapd RADIUS server to dump each derived MSK into a text file (e.g., to be used as an input to wlantest). This functionality is not included in the default build and can be enabled by adding the following line to hostapd/.config: CFLAGS += -DCONFIG_RADIUS_TEST The MSK dump file is specified with dump_msk_file parameter in hostapd.conf (path to the dump file). If this variable is not set, MSK dump mechanism is not enabled at run time. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 5eb7b49..9d39b48 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2155,6 +2155,11 @@ struct hostapd_config * hostapd_config_read(const char *fname)
if (parse_roaming_consortium(bss, pos, line) < 0)
errors++;
#endif /* CONFIG_INTERWORKING */
+#ifdef CONFIG_RADIUS_TEST
+ } else if (os_strcmp(buf, "dump_msk_file") == 0) {
+ os_free(bss->dump_msk_file);
+ bss->dump_msk_file = os_strdup(pos);
+#endif /* CONFIG_RADIUS_TEST */
} else {
wpa_printf(MSG_ERROR, "Line %d: unknown configuration "
"item '%s'", line, buf);