From 1c7447d08b2b7368201e4df456ee3da50a00f5aa Mon Sep 17 00:00:00 2001 From: Wei-Jen Lin Date: Wed, 2 May 2012 15:19:02 +0300 Subject: [PATCH] P2P: Fix Device ID matching for Probe Request frames The misplaced parenthesis caused Device ID matching to check only the first octet of the P2P Device Address, i.e., we could have replied to Probe Request frames that was searching for another device if any of the last five octets of the address were different. Signed-hostap: Jouni Malinen intended-for: hostap-1 --- src/p2p/p2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 2f5a0a0fe..8bb84dbae 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -1911,7 +1911,7 @@ p2p_reply_probe(struct p2p_data *p2p, const u8 *addr, const u8 *dst, } if (msg.device_id && - os_memcmp(msg.device_id, p2p->cfg->dev_addr, ETH_ALEN != 0)) { + os_memcmp(msg.device_id, p2p->cfg->dev_addr, ETH_ALEN) != 0) { /* Device ID did not match */ p2p_parse_free(&msg); return P2P_PREQ_NOT_PROCESSED;