]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix Device ID matching for Probe Request frames
authorWei-Jen Lin <jenlin@qca.qualcomm.com>
Wed, 2 May 2012 12:19:02 +0000 (15:19 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 2 May 2012 12:19:02 +0000 (15:19 +0300)
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 <jouni@qca.qualcomm.com>
intended-for: hostap-1

src/p2p/p2p.c

index 2f5a0a0fe8b6c4b5c69be9e1b3f69c21b359b709..8bb84dbaebece47d6952e19ce081091a370bf979 100644 (file)
@@ -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;