P2PS: Set intended interface address correctly for new group
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Thu, 2 Jul 2015 07:45:07 +0000 (10:45 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 7 Jul 2015 17:57:07 +0000 (20:57 +0300)
commit5cc6ec0f6888ff662fdb2b33d500fe8579a8b09f
treef78abd9cc79dff8c6ee7fb62dbb17eaf3ef94b11
parent1f14e2bf9207c055385bc914cdfd8f4bf86111f2
P2PS: Set intended interface address correctly for new group

If a device may be an explicit GO, it adds the GO details in the PD
Request. First, we try to reuse an active GO. If it is not present, we
try to reuse a non-active persistent group. In the latter case, if a
dedicated P2P interface is needed, the intended address should be that
of the pending interface. However, the wpas_get_go_info() provided the
ssid->bssid address, which is the address of the P2P device. This might
result in an incorrect intended interface attribute in the PD Request in
case a separate group interface is used.

Fix this by setting group_iface variable to true only if a dedicated
interface should be used and set the attribute accordingly.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
src/p2p/p2p_pd.c
wpa_supplicant/p2p_supplicant.c