]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Verify P2P GO/client address with all interface addresses
authorArend van Spriel <arend@broadcom.com>
Sun, 30 Jun 2013 07:38:41 +0000 (10:38 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 30 Jun 2013 07:50:13 +0000 (10:50 +0300)
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@broadcom.com>

src/drivers/driver_nl80211.c

index a613a2a4f433459e55be1ffae3d16018d5f9873d..2bbe50ec6b9e51cc8fcea89486902eedf5ae5a6a 100644 (file)
@@ -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) {