aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-02-27 15:30:28 +0200
committerArik Nemtsov <arik@wizery.com>2012-07-30 17:48:05 +0300
commit3ac2d6ca6847e39cf00d041be1f5c3836288a7f4 (patch)
tree1a67940096ac502fc64565b157c93323864dd3b1 /src
parent0203d63ddab44b26e6132d245a40ddebc0367d7b (diff)
downloadexternal_wpa_supplicant_8_ti-3ac2d6ca6847e39cf00d041be1f5c3836288a7f4.zip
external_wpa_supplicant_8_ti-3ac2d6ca6847e39cf00d041be1f5c3836288a7f4.tar.gz
external_wpa_supplicant_8_ti-3ac2d6ca6847e39cf00d041be1f5c3836288a7f4.tar.bz2
P2P: ignore neg_req with previously used dialog_token
If for some reason we get a duplicate negotiation request, the supplicant will generate 2 different responses (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). Workaround it by ignoring negotiation requests with the last used dialog_token. Signed-off-by: Eliad Peller <eliad@wizery.com>
Diffstat (limited to 'src')
-rw-r--r--src/p2p/p2p_go_neg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c
index 248b2a0..51db6df 100644
--- a/src/p2p/p2p_go_neg.c
+++ b/src/p2p/p2p_go_neg.c
@@ -534,6 +534,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,