From: Jouni Malinen Date: Fri, 18 Nov 2011 19:58:18 +0000 (+0200) Subject: P2P: Fix collection of member-in-group information for peer entries X-Git-Tag: aosp-jb-start~309 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5472a450fc1e023a448fc5fc16f7bab93ffbd44;p=thirdparty%2Fhostap.git P2P: Fix collection of member-in-group information for peer entries Invalid use of memcpy instead of memcmp in comparison resulted in the GO interface address getting set incorrectly if the GO did not show up in scan results anymore. Signed-hostap: Jouni Malinen --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 48a5d007b..e75054783 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -365,7 +365,7 @@ static int p2p_add_group_clients(struct p2p_data *p2p, const u8 *go_dev_addr, * group, the information will be restored in the loop following this. */ dl_list_for_each(dev, &p2p->devices, struct p2p_device, list) { - if (os_memcpy(dev->member_in_go_iface, go_interface_addr, + if (os_memcmp(dev->member_in_go_iface, go_interface_addr, ETH_ALEN) == 0) { os_memset(dev->member_in_go_iface, 0, ETH_ALEN); os_memset(dev->member_in_go_dev, 0, ETH_ALEN);