From: Arend van Spriel Date: Sun, 30 Jun 2013 07:38:41 +0000 (+0300) Subject: nl80211: Verify P2P GO/client address with all interface addresses X-Git-Tag: aosp-kk-from-upstream~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f608081c1d74589b44e6fda6df44bb3a1b55e884;p=thirdparty%2Fhostap.git nl80211: Verify P2P GO/client address with all interface addresses With P2P Device support there will be two interfaces with their own MAC address. The P2P Interface Address must be unique so verify it is. Signed-hostap: Arend van Spriel --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index a613a2a4f..2bbe50ec6 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -9025,7 +9025,7 @@ static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type, nl80211_remove_iface(drv, ifidx); return -1; } - if (os_memcmp(if_addr, new_addr, ETH_ALEN) == 0) { + if (nl80211_addr_in_use(drv->global, new_addr)) { wpa_printf(MSG_DEBUG, "nl80211: Allocate new address " "for P2P group interface"); if (nl80211_p2p_interface_addr(drv, new_addr) < 0) {