From a25480d479b5b836f8baa197791d6ff9f21b2b1a Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 18 Sep 2025 14:02:25 +0200 Subject: [PATCH] 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 --- feeds/qca-wifi-7/hostapd/files/common.uc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/feeds/qca-wifi-7/hostapd/files/common.uc b/feeds/qca-wifi-7/hostapd/files/common.uc index 31b526b6a..4aca3e0ec 100644 --- a/feeds/qca-wifi-7/hostapd/files/common.uc +++ b/feeds/qca-wifi-7/hostapd/files/common.uc @@ -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: