mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-02 11:27:48 +00:00
ratelimit: fix ratelimit for multiple bss
The function looking up the rate was leaking a local variable into the global space Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -101,6 +101,7 @@ deliface() {
|
|||||||
|
|
||||||
found=0
|
found=0
|
||||||
find_ssid() {
|
find_ssid() {
|
||||||
|
local ssid
|
||||||
config_get ssid $1 ssid
|
config_get ssid $1 ssid
|
||||||
[ "$ssid" == "$2" ] || return
|
[ "$ssid" == "$2" ] || return
|
||||||
found=1
|
found=1
|
||||||
@@ -119,7 +120,7 @@ addiface() {
|
|||||||
echo -n startup > /tmp/ratelimit.$iface
|
echo -n startup > /tmp/ratelimit.$iface
|
||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
ssid=$(ubus call network.wireless status | jsonfilter -e '@[*].interfaces[@.ifname="'"$iface"'"].config.ssid')
|
ssid=$(ubus call hostapd.$iface get_status | jsonfilter -e '@.ssid')
|
||||||
[ -z "$ssid" ] && {
|
[ -z "$ssid" ] && {
|
||||||
rm /tmp/ratelimit.$iface
|
rm /tmp/ratelimit.$iface
|
||||||
logger "ratelimit: failed to lookup ssid"
|
logger "ratelimit: failed to lookup ssid"
|
||||||
|
|||||||
Reference in New Issue
Block a user