path: root/wpa_supplicant/ibss_rsn.h
diff options
authorAntonio Quartulli <antonio@open-mesh.com>2013-07-21 12:56:53 (GMT)
committerJouni Malinen <j@w1.fi>2013-07-21 12:56:53 (GMT)
commit13adc57b39091dc59372efbeb614b74310dd2e02 (patch)
tree2df0695b7fb6c9c8d068b488de396c8739f737fb /wpa_supplicant/ibss_rsn.h
parentb21990b4bbe4e5668cfe87228730420628b6de19 (diff)
IBSS RSN: Add peer restart detection
To better support the IBSS/RSN mechanism, wpa_supplicant has to be able to detect a possible peer reboot and in this case it should start a new EAPOL handshake. To perform such reboot detection wpa_supplicant has to perform an Open Authentication by sending an Authentication frame and then replying to it. IF an Authentication frame is received when the key have already been exchanged, wpa_supplicant understands that the peer has rebooted and can reset its state machine. Whenever a new peer is added to the IBSS wpa_supplicant will start the Open Authentication and only after having accomplished it will start the key exchange. If the driver does not support Authentication frame exchange initiated from user space, this step is skipped to maintain previous behavior (just go through EAPOL-Key frame processing). The Open Authentication was partly supported by the Linux kernel but now wpa_supplicant can register for Authentication frames, handle it in userspace and so avoid any possible race condition. Signed-hostap: Nicolas Cavallari <cavallar@lri.fr> Signed-hostap: Antonio Quartulli <antonio@open-mesh.com>
Diffstat (limited to 'wpa_supplicant/ibss_rsn.h')
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/ibss_rsn.h b/wpa_supplicant/ibss_rsn.h
index 1da94ab..5a8eda4 100644
--- a/wpa_supplicant/ibss_rsn.h
+++ b/wpa_supplicant/ibss_rsn.h
@@ -11,6 +11,15 @@
struct ibss_rsn;
+/* not authenticated */
+/* remote peer sent an EAPOL message */
+/* we sent an AUTH message with seq 1 */
+#define IBSS_RSN_AUTH_BY_US 0x02
+/* we sent an EAPOL message */
struct ibss_rsn_peer {
struct ibss_rsn_peer *next;
struct ibss_rsn *ibss_rsn;
@@ -23,6 +32,7 @@ struct ibss_rsn_peer {
size_t supp_ie_len;
struct wpa_state_machine *auth;
+ int authentication_status;
struct ibss_rsn {
@@ -40,5 +50,7 @@ void ibss_rsn_stop(struct ibss_rsn *ibss_rsn, const u8 *peermac);
int ibss_rsn_rx_eapol(struct ibss_rsn *ibss_rsn, const u8 *src_addr,
const u8 *buf, size_t len);
void ibss_rsn_set_psk(struct ibss_rsn *ibss_rsn, const u8 *psk);
+void ibss_rsn_handle_auth(struct ibss_rsn *ibss_rsn, const u8 *auth_frame,
+ size_t len);
#endif /* IBSS_RSN_H */