diff options
| author | Jouni Malinen <jouni@qca.qualcomm.com> | 2015-10-15 18:21:28 +0000 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-04-01 16:51:45 +0530 |
| commit | 6ea5af00beb889ba3ea3d28608f89651ee49d8de (patch) | |
| tree | d1502832c8fabe924b75b84d2c7daa9ced2ee48a | |
| parent | b77598c858fa124068bcff19ab9a282f167033ba (diff) | |
| download | android_external_wpa_supplicant_8-6ea5af00beb889ba3ea3d28608f89651ee49d8de.tar.gz android_external_wpa_supplicant_8-6ea5af00beb889ba3ea3d28608f89651ee49d8de.tar.bz2 android_external_wpa_supplicant_8-6ea5af00beb889ba3ea3d28608f89651ee49d8de.zip | |
P2P: Do not reply to GO Negotiation Request if peer is waiting for us
This improves robustness of GO Negotiation in special cases where GO
Negotiation Request frames from the peer may end up getting delivered
multiple times, e.g., due to interference and retransmitted frames not
getting properly filtered out in duplicate detection (which is something
that number of drivers do not implement for pre-associated state).
If we have already replied with GO Negotiation Response frame with
Status 1 (not yet ready), do not reply to another GO Negotiation Request
frame from the peer if we have already received authorization from the
user (P2P_CONNECT command) for group formation and have sent out our GO
Negotiation Request frame. This avoids a possible sequence where two
independent GO Negotiation instances could go through in parallel if the
MAC address based rule on avoiding duplicate negotiations is not able to
prevent the case. This can allow GO Negotiation to complete successfully
whereas the previous behavior would have likely resulted in a failure
with neither device sending a GO Negotiation Confirm frame.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 2b12b3602aa5ee60fbbaf723e508321eb86ee10f
Git-repo: git://w1.fi/srv/git/hostap.git
Change-Id: Ifb8cf34c7e58ce8fd5aef57b3d2e3b8fb1e733de
CRs-fixed: 924507
| -rw-r--r-- | src/p2p/p2p_go_neg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index 4b8cd753..ef142d4e 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -901,6 +901,14 @@ void p2p_process_go_neg_req(struct p2p_data *p2p, const u8 *sa, return; } + if (dev->go_neg_req_sent && + (dev->flags & P2P_DEV_PEER_WAITING_RESPONSE)) { + p2p_dbg(p2p, + "Do not reply since peer is waiting for us to start a new GO Negotiation and GO Neg Request already sent"); + p2p_parse_free(&msg); + return; + } + go = p2p_go_det(p2p->go_intent, *msg.go_intent); if (go < 0) { p2p_dbg(p2p, "Incompatible GO Intent"); |
