Fix sending non-Public Action frames over P2P Device interface
authorLior David <qca_liord@qca.qualcomm.com>
Wed, 30 Mar 2016 11:57:31 +0000 (14:57 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 20 May 2016 21:17:45 +0000 (00:17 +0300)
commita26c9c2e710a74c7e0fc9a5bf1ddf79b2bdfc49a
treedab2dcb6d777a47878ab1cd5d051fdc7b59c1194
parent4d916ed6c502252107d0e6c5c10d66a2193e2c87
Fix sending non-Public Action frames over P2P Device interface

The P2P Device interface can only send Public Action frames. Non-Public
Action frames must be sent over a group interface. The previous
implementation sometimes tried to send non-Public Action frames such as
GO Discoverability over the P2P Device interface, however, the source
address of the frame was set to the group interface address so the code
in offchannel.c knew to select the correct interface for the TX.

The check breaks when the P2P Device and group interfaces have the same
MAC address. In this case the frame will be sent over the P2P Device
interface and the send will fail.

Fix this problem in two places:
1. In offchannel, route non-Public Action frames to the GO
   interface when the above conditions are met.
2. When a TX_STATUS event arrives on such routed frame, it will
   arrive on the GO interface but it must be handled by the P2P Device
   interface since it has the relevant state logic.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
wpa_supplicant/events.c
wpa_supplicant/offchannel.c