P2P: Check Invitation Response dialog token match for resend case
authorSunil Dutt <usdutt@qti.qualcomm.com>
Mon, 8 Dec 2014 09:41:16 +0000 (15:11 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 9 Dec 2014 14:26:47 +0000 (16:26 +0200)
commit36b5c3335ad512061d2b39af03bb7e3508209951
treea4813a94558ac1ea2c2c963612c31ed8fe0cb2b3
parent1f90dfd2cd0fcb0ade2b7ce9aa60433c83402b17
P2P: Check Invitation Response dialog token match for resend case

Commit ac330cfd87397a1a01e697984f3944f427e88dad ('P2P: Reinvite with
social operation channel if no common channels') introduced a mechamisn
to reinvite a peer during a persistent group reinvocation from a GO with
a different operating channel proposal. This mechanism can fail if the
inviting device (GO) ends up getting a retransmitted, duplicated
Invitation Response frame processed second time while waiting for the
response to the retried Invitation Request (using one of the social
channels as the operating channel). IEEE 802.11 duplicate frame
detection mechanisms are supposed to prevent this type of sequence, but
not all drivers support those rules properly for pre-association frames,
including P2P Public Action frames.

Work around this issue by checking that the dialog token in the
Invitation Response frame matches the one from the last Invitation
Request if the special invitation retry mechanism is used. This is safer
to do now than to enable dialog token matching for all invitation cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/p2p/p2p.c
src/p2p/p2p_i.h
src/p2p/p2p_invitation.c