P2P: Fix p2p_ctrl_invite_persistent() to parse peer parameter
Commit 4d32c0c44d
added another use for the
local pos variable and that broke the mechanism used to determine wheter
the peer address was provided. Fix this by using a separate pointer to the
peer address.
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
6df865face
commit
54c61e6e08
1 changed files with 3 additions and 3 deletions
|
@ -3520,7 +3520,7 @@ static int p2p_ctrl_invite_persistent(struct wpa_supplicant *wpa_s, char *cmd)
|
|||
char *pos;
|
||||
int id;
|
||||
struct wpa_ssid *ssid;
|
||||
u8 peer[ETH_ALEN];
|
||||
u8 *_peer = NULL, peer[ETH_ALEN];
|
||||
int freq = 0;
|
||||
int ht40;
|
||||
|
||||
|
@ -3530,6 +3530,7 @@ static int p2p_ctrl_invite_persistent(struct wpa_supplicant *wpa_s, char *cmd)
|
|||
pos += 6;
|
||||
if (hwaddr_aton(pos, peer))
|
||||
return -1;
|
||||
_peer = peer;
|
||||
}
|
||||
ssid = wpa_config_get_network(wpa_s->conf, id);
|
||||
if (ssid == NULL || ssid->disabled != 2) {
|
||||
|
@ -3549,8 +3550,7 @@ static int p2p_ctrl_invite_persistent(struct wpa_supplicant *wpa_s, char *cmd)
|
|||
|
||||
ht40 = os_strstr(cmd, " ht40") != NULL;
|
||||
|
||||
return wpas_p2p_invite(wpa_s, pos ? peer : NULL, ssid, NULL, freq,
|
||||
ht40);
|
||||
return wpas_p2p_invite(wpa_s, _peer, ssid, NULL, freq, ht40);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue