Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Linux optimizations #360

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +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 -a options
declare -a routes=()
declare route
Expand All @@ -16,7 +17,10 @@ declare keyexpiry
# 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: Executing it before "tailscale up" to avoid warning messages
ethtool -K $(ip route show 0/0 | cut -f5 -d' ') rx-udp-gro-forwarding on rx-gro-list off
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

# Default options
options+=(--hostname "$(bashio::info.hostname)")
Expand Down