mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-30 13:03:09 +01:00
mac80211: fix use of local variable
mac80211_get_addr is called from mac80211_generate_mac, where the local variable
initialisation id="${macidx:-0}" suggests that macidx is not always defined.
Probably, idx was supposed to be used instead of $(($macidx + 1)).
Fixes: 4d99db168c ("mac80211: try to get interface addresses from wiphy sysfs 'addresses' if no mask is set")
Signed-off-by: Leon M. George <leon@georgemail.eu>
(cherry picked from commit 8f95220bcb)
This commit is contained in:
parent
938839a565
commit
73fecd36bf
1 changed files with 1 additions and 1 deletions
|
|
@ -352,7 +352,7 @@ mac80211_get_addr() {
|
|||
local phy="$1"
|
||||
local idx="$(($2 + 1))"
|
||||
|
||||
head -n $(($macidx + 1)) /sys/class/ieee80211/${phy}/addresses | tail -n1
|
||||
head -n $idx /sys/class/ieee80211/${phy}/addresses | tail -n1
|
||||
}
|
||||
|
||||
mac80211_generate_mac() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue