diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2011-10-11 18:29:31 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-10-11 18:29:31 +0300 |
commit | 4458d91554cce6c8a78916701c2701162cbbfad1 (patch) | |
tree | 18e94af3de3b8093d17cea8b9e8222762c5c7bc1 /src/p2p/p2p_go_neg.c | |
parent | c3fea272747f738f5723fc577371fe03711d988f (diff) | |
download | external_wpa_supplicant_8_ti-4458d91554cce6c8a78916701c2701162cbbfad1.zip external_wpa_supplicant_8_ti-4458d91554cce6c8a78916701c2701162cbbfad1.tar.gz external_wpa_supplicant_8_ti-4458d91554cce6c8a78916701c2701162cbbfad1.tar.bz2 |
P2P: Do not change SSID during GO negotiation
If GO Negotiation Request (or in theory, also GO Negotiation Response)
frame is delivered multiple time for processing, the SSID of the group
could end up getting changed. This could result in possible issues if
the peer ended up using different SSID. To avoid this, make sure the
SSID does not get changed unless the negotiation is for a new group.
Diffstat (limited to 'src/p2p/p2p_go_neg.c')
-rw-r--r-- | src/p2p/p2p_go_neg.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index be04fad..b506a80 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -581,7 +581,10 @@ void p2p_process_go_neg_req(struct p2p_data *p2p, const u8 *sa, p2p->op_channel)) p2p_reselect_channel(p2p, &intersection); - p2p_build_ssid(p2p, p2p->ssid, &p2p->ssid_len); + if (!p2p->ssid_set) { + p2p_build_ssid(p2p, p2p->ssid, &p2p->ssid_len); + p2p->ssid_set = 1; + } } dev->go_state = go ? LOCAL_GO : REMOTE_GO; @@ -950,7 +953,10 @@ void p2p_process_go_neg_resp(struct p2p_data *p2p, const u8 *sa, p2p->op_channel)) p2p_reselect_channel(p2p, &intersection); - p2p_build_ssid(p2p, p2p->ssid, &p2p->ssid_len); + if (!p2p->ssid_set) { + p2p_build_ssid(p2p, p2p->ssid, &p2p->ssid_len); + p2p->ssid_set = 1; + } } p2p_set_state(p2p, P2P_GO_NEG); |