hostapd: fix MAC overlap with MBSSID enabled

Reverse byte order in non-OUI part of MAC address to prevent overlap
when MBSSID is enabled. Swaps bytes 3 and 5 and masks lower nibble
of byte 5 before applying index XOR.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2025-09-18 14:02:25 +02:00
parent 2f625c35f0
commit a25480d479

View File

@@ -259,8 +259,13 @@ const phy_proto = {
addr[0] ^= idx << 2;
break;
case "b5":
if (mbssid)
if (mbssid) {
let b5 = addr[5];
addr[5] = addr[3];
addr[3] = b5;
addr[5] &= ~0xf;
addr[0] |= 2;
}
addr[5] ^= idx;
break;
default: