diff options
author | Jithu Jance <jithu@broadcom.com> | 2011-11-18 23:13:03 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-11-18 23:13:03 +0200 |
commit | 5cfda25e444b4144551d5320d3b1831339914439 (patch) | |
tree | 7dc2295d978256927507194442f82c604c5754d1 /src/p2p | |
parent | 1966e3d1b798984e38b6ea1c2a24f6e5d6205125 (diff) | |
download | external_wpa_supplicant_8_ti-5cfda25e444b4144551d5320d3b1831339914439.zip external_wpa_supplicant_8_ti-5cfda25e444b4144551d5320d3b1831339914439.tar.gz external_wpa_supplicant_8_ti-5cfda25e444b4144551d5320d3b1831339914439.tar.bz2 |
P2P: Indicate GO Negotiation failure on peer expiration
If P2P device expires while a GO Negotiation is in progress, currently
p2p->go_neg_peer is cleared without indicating GO Nego failure. This
will result in pending group interfaces to be left over. This patch will
indicate GO Negotiation failure and will remove any pending group
interfaces.
This patch addresses a corner case in GO-Negotiation case. Consider the
scenario where two devices A and B are in discovery stage and Device B
vanishes [moves out of range] when a connect is issued on the Device A.
Then Device A keeps on retrying the GO Negotiation Request till the
retry limit is reached. On reaching retry limit, the pending group
interface is removed. But suppose if the peer entry in the device list
expires before the retry limit is reached, then pending group interface
was not removed.
Signed-off-by: Jithu Jance <jithu@broadcom.com>
Diffstat (limited to 'src/p2p')
-rw-r--r-- | src/p2p/p2p.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index e750547..8280c24 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -627,8 +627,13 @@ static void p2p_device_free(struct p2p_data *p2p, struct p2p_device *dev) { int i; - if (p2p->go_neg_peer == dev) + if (p2p->go_neg_peer == dev) { + /* + * If GO Negotiation is in progress, report that it has failed. + */ + p2p_go_neg_failed(p2p, dev, -1); p2p->go_neg_peer = NULL; + } if (p2p->invite_peer == dev) p2p->invite_peer = NULL; if (p2p->sd_peer == dev) |