path: root/wpa_supplicant/p2p_supplicant.h
diff options
authorJouni Malinen <j@w1.fi>2013-09-01 18:28:16 (GMT)
committerJouni Malinen <j@w1.fi>2013-09-01 18:35:10 (GMT)
commit5bf9a6c8595fa1aef20e3f45fcd7906fa216a002 (patch)
tree60b480d9a9572ccf42853246cc57df272ffa883e /wpa_supplicant/p2p_supplicant.h
parenteac8dab87c92f13d778ea5634a500593540a3d1a (diff)
P2P: Add event messages for possible PSK failures on P2P groups
It is possible for the GO of a persistent group to change the PSK or remove a client when per-client PSKs are used and this can happen without the SSID changing (i.e., the group is still valid, but just not for a specific client). If the client side of such persistent group ends up trying to use an invalidated persistent group information, the connection will fail in 4-way handshake. A new WPS provisioning step is needed to recover from this. Detect this type of case based on two 4-way handshake failures when acting as a P2P client in a persistent group. A new "P2P-PERSISTENT-PSK-FAIL id=<persistent group id>" event is used to indicate when this happens. This makes it easier for upper layers to remove the persistent group information with "REMOVE_NETWORK <persistent group id>" if desired (e.g., based on user confirmation). In addition to indicating the error cases for persistent groups, all this type of PSK failures end up in the client removing the group with the new reason=PSK_FAILURE information in the P2P-GROUP-REMOVED event. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.h')
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.h b/wpa_supplicant/p2p_supplicant.h
index 5c39a17..c718fba 100644
--- a/wpa_supplicant/p2p_supplicant.h
+++ b/wpa_supplicant/p2p_supplicant.h
@@ -160,10 +160,16 @@ void wpas_p2p_remove_client(struct wpa_supplicant *wpa_s, const u8 *peer,
#ifdef CONFIG_P2P
void wpas_p2p_continue_after_scan(struct wpa_supplicant *wpa_s);
+int wpas_p2p_4way_hs_failed(struct wpa_supplicant *wpa_s);
#else /* CONFIG_P2P */
static inline void wpas_p2p_continue_after_scan(struct wpa_supplicant *wpa_s)
+static inline int wpas_p2p_4way_hs_failed(struct wpa_supplicant *wpa_s)
+ return 0;
#endif /* CONFIG_P2P */
#endif /* P2P_SUPPLICANT_H */