shinobu/router/tc: Properly use hex for identifiers
This commit is contained in:
parent
5d696d67f0
commit
19da5e13b9
|
@ -18,8 +18,8 @@ let
|
||||||
, qdiscArgs ? [ "fq_codel" ]
|
, qdiscArgs ? [ "fq_codel" ]
|
||||||
, prio
|
, prio
|
||||||
}: ''
|
}: ''
|
||||||
tc class add dev ${cfg.interface} parent ${toString cfg.major}:1 classid ${toString cfg.major}:${toString minor} htb rate ${rate} ceil ${ceil} burst ${burst} prio ${toString prio}
|
tc class add dev ${cfg.interface} parent ${lib.toHexString cfg.major}:1 classid ${lib.toHexString cfg.major}:${lib.toHexString minor} htb rate ${rate} ceil ${ceil} burst ${burst} prio ${toString prio}
|
||||||
tc qdisc add dev ${cfg.interface} parent ${toString cfg.major}:${toString minor} handle ${toString minor}:1 ${lib.escapeShellArgs qdiscArgs}
|
tc qdisc add dev ${cfg.interface} parent ${lib.toHexString cfg.major}:${lib.toHexString minor} handle ${lib.toHexString minor}:1 ${lib.escapeShellArgs qdiscArgs}
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -36,8 +36,8 @@ in
|
||||||
# deleting might fail
|
# deleting might fail
|
||||||
tc qdisc del root dev ${cfg.interface} || true
|
tc qdisc del root dev ${cfg.interface} || true
|
||||||
|
|
||||||
tc qdisc add dev ${cfg.interface} root handle ${toString cfg.major}:0 htb default 2
|
tc qdisc add dev ${cfg.interface} root handle ${lib.toHexString cfg.major}:0 htb default 2
|
||||||
tc class add dev ${cfg.interface} parent ${toString cfg.major}:0 classid ${toString cfg.major}:1 htb rate ${toString cfg.rate} burst 15k
|
tc class add dev ${cfg.interface} parent ${lib.toHexString cfg.major}:0 classid ${lib.toHexString cfg.major}:1 htb rate ${toString cfg.rate} burst 15k
|
||||||
|
|
||||||
${lib.concatMapStrings mkClass cfg.classes}
|
${lib.concatMapStrings mkClass cfg.classes}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue