Skip to content

Commit

Permalink
Fix bug in custom prio class config parser
Browse files Browse the repository at this point in the history
If the ceil was left unset and prio was defined, like "100:20M::3"
the prio was used as the ceil.
  • Loading branch information
hkbakke committed Feb 3, 2018
1 parent 7fe32de commit 11a68ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tc-gen
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ add_prio_classes () {
local CLASSES=( $(echo "${CLASS_CONFIG}" | tr ',' ' ') )

for CLASS in ${CLASSES[@]}; do
local CONFIG=( $(echo "${CLASS}" | tr ':' ' ') )
local CONFIG
IFS=':' read -r -a CONFIG <<< "${CLASS}"
local HANDLE=${CONFIG[0]}
local CLASS_RATE=$(convert_rate ${CONFIG[1]})
local CEIL_RATE=${MAX_RATE}
Expand Down

0 comments on commit 11a68ee

Please sign in to comment.