[PATCH V2 21/23] nl80211: verify P2P-GO/CLIENT address with all interface addresses

Arend van Spriel arend
Wed May 29 02:08:08 PDT 2013


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 <arend at broadcom.com>
---
 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 71d20c0..ca1ffb8 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -8892,7 +8892,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) {
-- 
1.7.10.4





More information about the Hostap mailing list