Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cake-autorate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,12 @@ set_shaper_rate()

if ((adjust_shaper_rate[${direction}]))
then
tc qdisc change root dev "${interface[${direction}]}" cake bandwidth "${shaper_rate_kbps[${direction}]}Kbit" 2> /dev/null
# on failure keep the previous internal state so the change is retried on the next update
if ! tc qdisc change root dev "${interface[${direction}]}" cake bandwidth "${shaper_rate_kbps[${direction}]}Kbit" 2> /dev/null
then
log_msg "WARNING" "Failed to change CAKE bandwidth on ${interface[${direction}]}."
return 1
fi
else
((output_cake_changes)) && log_msg "DEBUG" "adjust_${direction}_shaper_rate set to 0 in config, so skipping the corresponding tc qdisc change call."
fi
Expand Down