From 19da5e13b95305e123636e82747bbbb3adc60d97 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 18 Oct 2023 20:01:34 +0200 Subject: [PATCH] shinobu/router/tc: Properly use hex for identifiers --- machines/shinobu/services/router/tc.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/machines/shinobu/services/router/tc.nix b/machines/shinobu/services/router/tc.nix index 6a72e9f..ac5c2a2 100644 --- a/machines/shinobu/services/router/tc.nix +++ b/machines/shinobu/services/router/tc.nix @@ -18,8 +18,8 @@ let , qdiscArgs ? [ "fq_codel" ] , 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 qdisc add dev ${cfg.interface} parent ${toString cfg.major}:${toString minor} handle ${toString minor}:1 ${lib.escapeShellArgs qdiscArgs} + 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 ${lib.toHexString cfg.major}:${lib.toHexString minor} handle ${lib.toHexString minor}:1 ${lib.escapeShellArgs qdiscArgs} ''; in { @@ -36,8 +36,8 @@ in # deleting might fail tc qdisc del root dev ${cfg.interface} || true - tc qdisc add dev ${cfg.interface} root handle ${toString 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 qdisc add dev ${cfg.interface} root handle ${lib.toHexString cfg.major}:0 htb default 2 + 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} '';