Skip to content

Commit

Permalink
fix:一键/单个限速-对预添加终端(终端未上线)未生效
Browse files Browse the repository at this point in the history
  • Loading branch information
weifashi committed Oct 16, 2023
1 parent 0e4a7fe commit 870197f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hi/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2390,8 +2390,15 @@ function host_func() {
config_get mac $1 "mac"
config_get name $1 "name"
ipseg=$(echo $ip|awk -F"." '{print $1"."$2"."$3}')
qos_up=0
qos_down=0
[-e "/etc/config/qos" ] && {
_mac=$(echo $mac | sed 's/://g')
qos_up=$(uci get qos.$_mac.upload)
qos_down=$(uci get qos.$_mac.download)
}
if [ -n "$(grep $ipseg /etc/config/network)" ]; then
tmp='{"mac":"'$mac'","ip":"'$ip'","name":"'$name'"}'
tmp='{"mac":"'$mac'","ip":"'$ip'","name":"'$name'","qos_up":"'$qos_up'","qos_down":"'$qos_down'"}'
if [ -z "$list" ]; then
list=$tmp
else
Expand Down

0 comments on commit 870197f

Please sign in to comment.