mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix adding latency to interface
This commit is contained in:
parent
4a3bde8e09
commit
debdc682e1
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ omr_set_settings() {
|
|||
tc qdisc del dev ${ifname} root netem 2>&1 >/dev/null
|
||||
fi
|
||||
if [ "$addlatency" != "0" ]; then
|
||||
if [ "$(tc qdisc show dev $ifname | grep delay)" != "" ]; then
|
||||
if [ "$(tc qdisc show dev $ifname | grep delay)" = "" ]; then
|
||||
tc qdisc add dev ${ifname} root netem delay ${addlatency}ms 2>&1 >/dev/null
|
||||
elif [ "$(tc qdisc show dev $ifname | awk '/delay/ { print $10 }' | sed 's/ms//')" != "$addlatency" ]; then
|
||||
tc qdisc replace dev ${ifname} root netem delay ${addlatency}ms 2>&1 >/dev/null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue