From f608081c1d74589b44e6fda6df44bb3a1b55e884 Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Sun, 30 Jun 2013 10:38:41 +0300 Subject: [PATCH] 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 --- src/drivers/driver_nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {