diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-01-15 13:54:28 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-01-15 15:36:26 +0100 |
commit | 866790fd827cb0187353cdf484eb46a9b38fb6ba (patch) | |
tree | 26ed5065350880697081a25c62c5e7e8ff4c42c7 /package | |
parent | 2fe464a712f8da597475d63a0ad28ec678eb404a (diff) | |
download | upstream-866790fd827cb0187353cdf484eb46a9b38fb6ba.tar.gz upstream-866790fd827cb0187353cdf484eb46a9b38fb6ba.tar.bz2 upstream-866790fd827cb0187353cdf484eb46a9b38fb6ba.zip |
mac80211: fix MAC address allocations if the local bit is set on the base addr
If it's set, don't subtract 1 from the interface index encoded into the first
byte of the address
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index b0fc5fb37b..7ac0ce8aac 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -393,7 +393,7 @@ mac80211_generate_mac() { [ "$((0x$mask1))" -gt 0 ] && { b1="0x$1" [ "$id" -gt 0 ] && \ - b1=$(($b1 ^ ((($id - 1) << 2) | 0x2))) + b1=$(($b1 ^ ((($id - !($b1 & 2)) << 2) | 0x2))) printf "%02x:%s:%s:%s:%s:%s" $b1 $2 $3 $4 $5 $6 return } |