[PATCH] P2P: clear WPS method when GO negotiation fails
Johannes Berg
johannes
Mon Nov 7 06:33:48 PST 2011
From: Johannes Berg <johannes.berg at intel.com>
When GO negotation fails the WPS method is currently
not cleared, which can result in GO negotiation being
resumed when a GO negotiation request frame from is
received from the peer. That is unexpected as locally
we already gave up.
This manifests itself in getting
1319574733.955685: wlan0: P2P-GO-NEG-FAILURE status=-1
1319574733.955723: P2P: Removing pending group interface p2p-wlan0-0
...
1319574736.648378: wlan0: P2P: Starting GO Negotiation with previously authorized peer
...
1319574736.650115: wlan0: P2P: Sending GO Negotiation Response
...
1319574736.988038: wlan0: P2P-GO-NEG-SUCCESS
1319574736.988233: P2P: No pending group interface
1319574736.988268: P2P: Create a new interface p2p-wlan0-1 for the group
Clear the WPS method to avoid this situation. I wasn't
able to test this though, but given the log I can only
assume this is how the situation happened.
Reported-by: Reinette Chatre <reinette.chatre at intel.com>
Signed-hostap: Johannes Berg <johannes.berg at intel.com>
---
src/p2p/p2p.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 0f2a5d2..382e6b6 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -144,6 +144,8 @@ void p2p_go_neg_failed(struct p2p_data *p2p, struct p2p_device *peer,
struct p2p_go_neg_results res;
p2p_clear_timeout(p2p);
p2p_set_state(p2p, P2P_IDLE);
+ if (p2p->go_neg_peer)
+ p2p->go_neg_peer->wps_method = WPS_NOT_READY;
p2p->go_neg_peer = NULL;
os_memset(&res, 0, sizeof(res));
--
1.7.6.3
More information about the Hostap
mailing list