[PATCH] P2P: ignore neg_req with the last used dialog_token
Eliad Peller
eliad
Mon Mar 5 04:09:47 PST 2012
If for some reason we get duplicate negotiation request,
the supplicant will generate 2 different responses
(with different SSIDs) with the same dialog token.
The remote peer will confirm one of them, but it will
probably be the wrong one (the first it received,
whlie we keep track of the last one).
Workaround it but ignoring negotiation requests with
the last used dialog_token.
Signed-hostap: Eliad Peller <eliad at wizery.com>
intended-for: hostap-1
---
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 5216212..d3f6a49 100644
--- a/src/p2p/p2p_go_neg.c
+++ b/src/p2p/p2p_go_neg.c
@@ -496,6 +496,14 @@ void p2p_process_go_neg_req(struct p2p_data *p2p, const u8 *sa,
return;
}
+ if (dev->dialog_token == msg.dialog_token) {
+ wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
+ "P2P: Do not reply since dialog token %d "
+ "was already used", msg.dialog_token);
+ p2p_parse_free(&msg);
+ return;
+ }
+
go = p2p_go_det(p2p->go_intent, *msg.go_intent);
if (go < 0) {
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
--
1.7.6.401.g6a319
More information about the Hostap
mailing list