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>
This commit is contained in:
		| @@ -393,7 +393,7 @@ mac80211_generate_mac() { | |||||||
| 	[ "$((0x$mask1))" -gt 0 ] && { | 	[ "$((0x$mask1))" -gt 0 ] && { | ||||||
| 		b1="0x$1" | 		b1="0x$1" | ||||||
| 		[ "$id" -gt 0 ] && \ | 		[ "$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 | 		printf "%02x:%s:%s:%s:%s:%s" $b1 $2 $3 $4 $5 $6 | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Felix Fietkau
					Felix Fietkau