mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
netdev: honor handshake->spa if set
In order to support AlwaysRandomizeAddress and AddressOverride, station will set the desired address into the handshake object. Then, netdev checks if this was done and will use that address rather than generate one.
This commit is contained in:
parent
e7777c3422
commit
f13fd9d61f
@ -2560,8 +2560,13 @@ static int netdev_start_powered_mac_change(struct netdev *netdev,
|
||||
struct rtnl_data *req;
|
||||
uint8_t new_addr[6];
|
||||
|
||||
wiphy_generate_address_from_ssid(netdev->wiphy, (const char *)bss->ssid,
|
||||
/* No address set in handshake, use per-network MAC generation */
|
||||
if (util_mem_is_zero(netdev->handshake->spa, ETH_ALEN))
|
||||
wiphy_generate_address_from_ssid(netdev->wiphy,
|
||||
(const char *)bss->ssid,
|
||||
new_addr);
|
||||
else
|
||||
memcpy(new_addr, netdev->handshake->spa, ETH_ALEN);
|
||||
|
||||
/*
|
||||
* MAC has already been changed previously, no need to again
|
||||
|
Loading…
Reference in New Issue
Block a user