aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/hostapd.h
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-10-14 10:41:08 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-16 14:43:10 (GMT)
commit16579769ff7bb255e101c6b77fb2c47d3735a883 (patch)
tree53d796d142b46a66182f10e9120a14c798d54600 /src/ap/hostapd.h
parentb74f82a4f88107756f2320e9435a61cb165a569a (diff)
downloadhostap-16579769ff7bb255e101c6b77fb2c47d3735a883.zip
hostap-16579769ff7bb255e101c6b77fb2c47d3735a883.tar.gz
hostap-16579769ff7bb255e101c6b77fb2c47d3735a883.tar.bz2
Add testing functionality for resetting PN/IPN for configured keys
This can be used to test replay protection. The "RESET_PN" command in wpa_supplicant and "RESET_PN <addr>" command in hostapd resets the local counters to zero for the last configured key. For hostapd, the address parameter specifies which STA this operation is for or selects GTK ("ff:ff:ff:ff:ff:ff") or IGTK ("ff:ff:ff:ff:ff:ff IGTK"). This functionality is for testing purposes and included only in builds with CONFIG_TESTING_OPTIONS=y. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/hostapd.h')
-rw-r--r--src/ap/hostapd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index fee4134..f77e6ec 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -304,6 +304,18 @@ struct hostapd_data {
unsigned int ext_eapol_frame_io:1;
struct l2_packet_data *l2_test;
+
+ enum wpa_alg last_gtk_alg;
+ int last_gtk_key_idx;
+ u8 last_gtk[WPA_GTK_MAX_LEN];
+ size_t last_gtk_len;
+
+#ifdef CONFIG_IEEE80211W
+ enum wpa_alg last_igtk_alg;
+ int last_igtk_key_idx;
+ u8 last_igtk[WPA_IGTK_MAX_LEN];
+ size_t last_igtk_len;
+#endif /* CONFIG_IEEE80211W */
#endif /* CONFIG_TESTING_OPTIONS */
#ifdef CONFIG_MBO