aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-10-31 10:17:30 (GMT)
committerJouni Malinen <j@w1.fi>2010-10-31 10:17:30 (GMT)
commitd25f7212da92f337665868cc5a7926666ffe8685 (patch)
treee7ec989a658e4bc153616a476cfa1bbbaf1069bc
parentd394a22f3090311df419ad21a0f628c820e0edec (diff)
downloadhostap-d25f7212da92f337665868cc5a7926666ffe8685.zip
hostap-d25f7212da92f337665868cc5a7926666ffe8685.tar.gz
hostap-d25f7212da92f337665868cc5a7926666ffe8685.tar.bz2
Fix copy-paste bug in p2p_serv_disc_resp handling
The destination address for p2p_serv_disc_resp must always be set to an individual MAC address unlike p2p_serv_disc_req which may use 00:00:00:00:00:00 to indicate wildcard query. As such, we should not try to check for this special case here.
-rw-r--r--wpa_supplicant/ctrl_iface.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 8a2395a..bcf544b 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2116,7 +2116,7 @@ static int p2p_ctrl_serv_disc_cancel_req(struct wpa_supplicant *wpa_s,
static int p2p_ctrl_serv_disc_resp(struct wpa_supplicant *wpa_s, char *cmd)
{
int freq;
- u8 dst_buf[ETH_ALEN], *dst;
+ u8 dst[ETH_ALEN];
u8 dialog_token;
struct wpabuf *resp_tlvs;
char *pos, *pos2;
@@ -2130,12 +2130,8 @@ static int p2p_ctrl_serv_disc_resp(struct wpa_supplicant *wpa_s, char *cmd)
if (freq == 0)
return -1;
- if (hwaddr_aton(pos, dst_buf))
+ if (hwaddr_aton(pos, dst))
return -1;
- dst = dst_buf;
- if (dst[0] == 0 && dst[1] == 0 && dst[2] == 0 &&
- dst[3] == 0 && dst[4] == 0 && dst[5] == 0)
- dst = NULL;
pos += 17;
if (*pos != ' ')
return -1;