diff --git a/tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run b/tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run index d3666a67..e4678ae3 100755 --- a/tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run +++ b/tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run @@ -4,7 +4,7 @@ # Home Assistant Community Add-on: Tailscale # Runs after the machine has been logged in into the Tailscale network # ============================================================================== -declare default_route_device +declare interface declare -a options declare -a routes=() declare route @@ -15,12 +15,16 @@ declare keyexpiry # Linux optimizations for subnet routers and exit nodes # Based on: https://tailscale.com/kb/1320/performance-best-practices#linux-optimizations-for-subnet-routers-and-exit-nodes -# Note: Changes made via ethtool are not persistent and will be lost after the machine shuts down. +# Note: Changes made via ethtool are not persistent and will be lost after the machine shuts down # Note: Executing it before "tailscale up" to avoid warning messages -default_route_device=$(ip -4 route show 0/0 | cut -f5 -d' ') -if bashio::var.has_value "${default_route_device}"; then - ethtool -K "${default_route_device}" rx-udp-gro-forwarding on rx-gro-list off -fi +for interface in $( \ + { ip -4 route show 0/0; ip -6 route show ::/0; } \ + | cut -f5 -d' ' \ + | sort -u) +do + bashio::log.info "Allow UDP GRO for forwarding on ${interface}" + ethtool -K "${interface}" rx-udp-gro-forwarding on rx-gro-list off +done # Default options options+=(--hostname "$(bashio::info.hostname)")