From 26d87f95e252198b93539f95738febd8ef21792e Mon Sep 17 00:00:00 2001 From: randogoth Date: Sat, 7 Feb 2026 20:04:30 +0200 Subject: [PATCH] Harden tailscale offload tune service --- modules/services/tailscale.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/tailscale.nix b/modules/services/tailscale.nix index 5664ae4..e9771aa 100644 --- a/modules/services/tailscale.nix +++ b/modules/services/tailscale.nix @@ -18,7 +18,7 @@ serviceConfig = { Type = "oneshot"; ExecStart = '' - /bin/sh -c '${pkgs.iproute2}/bin/ip -o route get 8.8.8.8 | ${pkgs.coreutils}/bin/cut -f 5 -d " " | xargs -r ${pkgs.ethtool}/bin/ethtool -K rx-udp-gro-forwarding on rx-gro-list off' + /bin/sh -c 'DEV="$(${pkgs.iproute2}/bin/ip -o route get 8.8.8.8 2>/dev/null | ${pkgs.coreutils}/bin/awk "{for (i=1;i<=NF;i++) if (\\$i==\\\"dev\\\") {print \\$(i+1); exit}}")"; if [ -n "$DEV" ]; then ${pkgs.ethtool}/bin/ethtool -K "$DEV" rx-udp-gro-forwarding on rx-gro-list off || true; fi' ''; }; wantedBy = [ "multi-user.target" ];