diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-11-18 23:34:53 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-11-18 23:34:53 +0200 |
commit | eb916eb899aca7ff9fc8eea88c74eef4e3ad02fa (patch) | |
tree | 0b2afa00212a4cc0ec33bcf5f9f589e3769a6498 /src/p2p | |
parent | 6cad95db72e080c56b141fb2ab8170eebc1a82f4 (diff) | |
download | external_wpa_supplicant_8_ti-eb916eb899aca7ff9fc8eea88c74eef4e3ad02fa.zip external_wpa_supplicant_8_ti-eb916eb899aca7ff9fc8eea88c74eef4e3ad02fa.tar.gz external_wpa_supplicant_8_ti-eb916eb899aca7ff9fc8eea88c74eef4e3ad02fa.tar.bz2 |
P2P: Clear WPS method when GO negotiation fails
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 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@intel.com>
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'src/p2p')
-rw-r--r-- | 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 8280c24..c307505 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -146,6 +146,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)); |