]> git.ipfire.org Git - thirdparty/hostap.git/commit
P2P: Ignore unexpected GO Neg Resp is we have sent Resp
authorJouni Malinen <j@w1.fi>
Sat, 9 Jun 2012 15:31:24 +0000 (18:31 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 9 Jun 2012 15:31:24 +0000 (18:31 +0300)
commit198f82a1e3f78fd478e879185c43965c25840e0d
tree81460feae75da7d3953b19c18fb906b7474070f4
parenta1d2ab329e839838a623e1dd8c9fc77e97cd6355
P2P: Ignore unexpected GO Neg Resp is we have sent Resp

There is a race condition in GO Negotiation Request frame sending and
processing that may end up with both devices sending GO Negotiation
Response. This response frame was previously accepted even if a response
had already been sent. This could result in two GO Negotiation Confirm
frames being exchanged and consequently, with two separate GO
Negotiations completing concurrently. These negotiations could result in
getting mismatching parameters (e.g., both device could believe it was
the GO).

Fix this by ignoring GO Negotiation Response from the peer if twe have
already sent a GO Negotiation Response frame and we have the higher P2P
Device Address. This is similar to the rule used to determine whether to
reply to GO Negotiation Request frame when Request was already sent,
i.e., the same direction of GO Negotiation is maintained here to enforce
that only the negotiation initiated by the device with smaller P2P
Device Address is completed.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
src/p2p/p2p_go_neg.c