mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-01-28 01:47:19 +01:00
qosmngr: fix bug #4389 on devel
More generic fix to extract port index from port itself.
This commit is contained in:
parent
a8e48ca428
commit
4f820cd74c
1 changed files with 1 additions and 14 deletions
|
|
@ -646,29 +646,16 @@ assign_policer_to_port() {
|
|||
local portorder="$(db -q get hw.board.ethernetPortOrder)"
|
||||
local wanport="$(db -q get hw.board.ethernetWanPort)"
|
||||
|
||||
local board="$(db -q get hw.board.model_name | cut -c 1-2)"
|
||||
|
||||
local i=0
|
||||
if [ "$board" == "FT" ]; then
|
||||
i=3
|
||||
fi
|
||||
|
||||
for port in $portorder; do
|
||||
if [ "$ifname" == "$port" ]; then
|
||||
if [ "$wanport" == "$port" ]; then
|
||||
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure port/index=wan0 ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
else
|
||||
local i="${port: -1}"
|
||||
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure port/index=lan$i ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
fi
|
||||
break
|
||||
fi
|
||||
|
||||
if [ "$board" == "FT" ]; then
|
||||
i=$((i - 1))
|
||||
else
|
||||
i=$((i + 1))
|
||||
fi
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue