[PATCH] nl80211: Make nl80211_get_macaddr() reusable

Jouni Malinen j at w1.fi
Sat Oct 3 01:39:14 PDT 2026


On Sat, Oct 03, 2026 at 01:52:56AM +0000, Arowa Suliman wrote:
> Correct, there is no functional change in hostap.git. The comment was
> about the out-of-tree copy, which writes the result into bss->addr of
> the station netdev. If it runs after an external MAC address change but
> before the RTM_NEWLINK for that change is processed,
> nl80211_refresh_mac() sees no change and does not report
> EVENT_INTERFACE_MAC_CHANGED. The RSN state machine then keeps the old
> own address, and the 4-way handshake fails with "RSN: PMKID mismatch"
> because the AP uses the new address.
> 
> The Android code will read the address with linux_get_ifhwaddr() into a
> local buffer instead, as nl80211_refresh_mac() does. Sorry for the
> noise. Please ignore and drop this patch.

I have no issue applying the changes into hostap.git if that misleading
(in upstream) comment were removed. The direction of making this
function reusable and not hardcoding the location for the output address
is reasonable even if there is no immediate user for it in upstream.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list