From 89065be6cd462e590c8a9c93104325bc1437701c Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Thu, 27 Mar 2025 20:21:14 +0000 Subject: [PATCH] bandwidth is bits/second so divide by 8 --- modules/firewall/service.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/firewall/service.nix b/modules/firewall/service.nix index c22e987..8871968 100644 --- a/modules/firewall/service.nix +++ b/modules/firewall/service.nix @@ -50,7 +50,7 @@ let local n = output(s, "ifname"); local bw = output(s, "bandwidth"); if n and bw then - return "meta l4proto icmpv6 iifname ".. n .. " limit rate over " .. (math.floor (tonumber(bw) / 20)) .. " bytes/second drop" + return "meta l4proto icmpv6 iifname ".. n .. " limit rate over " .. (math.floor (tonumber(bw) / 8 / 20)) .. " bytes/second drop" else return "# " .. (n or "not n") .. " " .. (bw or "not bw") end