shaping: fix dangerous divisor!

This commit is contained in:
Astro 2016-11-26 02:42:39 +01:00
parent 88710eb24e
commit 67056cf2fa
4 changed files with 1 additions and 4 deletions

View File

@ -2,4 +2,3 @@ upstream:
interface: ipredator
up-bandwidth: 2000
flow-keys: nfct-src,nfct-dst
flows: 2048

View File

@ -2,4 +2,3 @@ upstream:
interface: up1
up-bandwidth: 6000
flow-keys: nfct-src,nfct-dst
flows: 2048

View File

@ -2,4 +2,3 @@ upstream:
interface: up2
up-bandwidth: 6000
flow-keys: nfct-src,nfct-dst
flows: 1024

View File

@ -5,5 +5,5 @@ if [ "$IFACE" = "{{ pillar['upstream']['interface'] }}" ]; then
tc qdisc add dev $IFACE root handle 1 hfsc default 1
tc class add dev $IFACE parent 1: classid 1:1 hfsc sc rate {{ pillar['upstream']['up-bandwidth'] }}kbit ul rate {{ pillar['upstream']['up-bandwidth'] }}kbit
tc qdisc add dev $IFACE parent 1:1 handle 11: fq_codel
tc filter add dev $IFACE parent 11: handle 11 protocol all flow hash keys {{ pillar['upstream']['flow-keys'] }} divisor {{ pillar['upstream']['flows'] }}
tc filter add dev $IFACE parent 11: handle 11 protocol all flow hash keys {{ pillar['upstream']['flow-keys'] }} divisor 1024
fi