diff mbox

P2P: Do not expire GO peer entry during group rekeying

Message ID E50901D4F2CF69428D43141B7C858679212D4F6FC3@EXMB03.eu.tieto.com
State Accepted
Commit d9a0f666960ee096fbaf21e72818772dbfa043b7
Headers show

Commit Message

Piotr.Nakraszewicz@tieto.com Feb. 8, 2012, 1:34 p.m. UTC
Hi,

If wpas_go_connected() is called during group rekeying the P2P GO peer will expire.
To prevent that check if group rekeying is not in progress.

---
 wpa_supplicant/p2p_supplicant.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Jouni Malinen Feb. 11, 2012, 8:55 a.m. UTC | #1
On Wed, Feb 08, 2012 at 03:34:09PM +0200, Piotr.Nakraszewicz@tieto.com wrote:
> If wpas_go_connected() is called during group rekeying the P2P GO peer will expire.
> To prevent that check if group rekeying is not in progress.

Thanks, applied.
diff mbox

Patch

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index ec4ba4a..b3f4a94 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -2222,7 +2222,8 @@  static int wpas_go_connected(void *ctx, const u8 *dev_addr)
 			continue;
 		if (ssid->mode != WPAS_MODE_INFRA)
 			continue;
-		if (wpa_s->wpa_state != WPA_COMPLETED)
+		if (wpa_s->wpa_state != WPA_COMPLETED &&
+			wpa_s->wpa_state != WPA_GROUP_HANDSHAKE)
 			continue;
 		if (os_memcmp(wpa_s->go_dev_addr, dev_addr, ETH_ALEN) == 0)
 			return 1;