mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 01:22:25 +00:00
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:
@@ -259,8 +259,13 @@ const phy_proto = {
|
|||||||
addr[0] ^= idx << 2;
|
addr[0] ^= idx << 2;
|
||||||
break;
|
break;
|
||||||
case "b5":
|
case "b5":
|
||||||
if (mbssid)
|
if (mbssid) {
|
||||||
|
let b5 = addr[5];
|
||||||
|
addr[5] = addr[3];
|
||||||
|
addr[3] = b5;
|
||||||
|
addr[5] &= ~0xf;
|
||||||
addr[0] |= 2;
|
addr[0] |= 2;
|
||||||
|
}
|
||||||
addr[5] ^= idx;
|
addr[5] ^= idx;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user