aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_glue.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-08 15:18:03 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-08 15:18:03 (GMT)
commitbc02843e75e5b9a2dfc7469adceb3fa3b69bf5fb (patch)
tree6795a25c871062295cdaf92b67cac765e4e0e5f5 /src/ap/wpa_auth_glue.c
parent44fa5e747b7aca39285e2511d5c94684e0723b6b (diff)
downloadhostap-bc02843e75e5b9a2dfc7469adceb3fa3b69bf5fb.zip
hostap-bc02843e75e5b9a2dfc7469adceb3fa3b69bf5fb.tar.gz
hostap-bc02843e75e5b9a2dfc7469adceb3fa3b69bf5fb.tar.bz2
hostapd: Add testing option to override own WPA/RSN IE(s)
This allows the new own_ie_override=<hexdump> configuration parameter to be used to replace the normally generated WPA/RSN IE(s) for testing purposes in CONFIG_TESTING_OPTIONS=y builds. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r--src/ap/wpa_auth_glue.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index d65dc63..f98cc50 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -92,6 +92,13 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,
#ifdef CONFIG_TESTING_OPTIONS
wconf->corrupt_gtk_rekey_mic_probability =
iconf->corrupt_gtk_rekey_mic_probability;
+ if (conf->own_ie_override &&
+ wpabuf_len(conf->own_ie_override) <= MAX_OWN_IE_OVERRIDE) {
+ wconf->own_ie_override_len = wpabuf_len(conf->own_ie_override);
+ os_memcpy(wconf->own_ie_override,
+ wpabuf_head(conf->own_ie_override),
+ wconf->own_ie_override_len);
+ }
#endif /* CONFIG_TESTING_OPTIONS */
#ifdef CONFIG_P2P
os_memcpy(wconf->ip_addr_go, conf->ip_addr_go, 4);