Skip to content

Commit

Permalink
Revert "Protect local subnets only if non-userspace networking is use…
Browse files Browse the repository at this point in the history
…d AND accepting routes are enabled"

This reverts commit d2fabc1.

# Conflicts:
#	tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run
  • Loading branch information
lmagyar committed Oct 23, 2023
1 parent adb30dd commit 1f519aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
7 changes: 2 additions & 5 deletions tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@ if keyexpiry=$(/opt/tailscale status --self=true --peers=false --json | jq -rce
bashio::log.warning "Please check your configuration based on the add-on's documentation under \"Configuration\""
fi

# Warn about colliding subnet routes if non-userspace networking and accepting routes are enabled
if bashio::config.false "userspace_networking" && \
(! bashio::config.has_value "accept_routes" || \
bashio::config.true "accept_routes");
then
# Notify about colliding subnet routes if non-userspace-networking is enabled
if bashio::config.false "userspace_networking"; then
readarray -t colliding_routes < <( \
comm -1 -2 \
<(subnet-routes local) \
Expand Down
11 changes: 3 additions & 8 deletions tailscale/rootfs/etc/s6-overlay/scripts/stage2_hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
# S6 Overlay stage2 hook to customize services
# ==============================================================================

# Disable protect-subnets service when userspace-networking is enabled or accepting routes is disabled
# Disable protect-subnets service when userspace-networking is enabled
# Disable mss-clamping service when userspace-networking is enabled
if ! bashio::config.has_value "userspace_networking" || \
bashio::config.true "userspace_networking" || \
bashio::config.false "accept_routes";
bashio::config.true "userspace_networking";
then
rm /etc/s6-overlay/s6-rc.d/user/contents.d/protect-subnets
rm /etc/s6-overlay/s6-rc.d/post-tailscaled/dependencies.d/protect-subnets
fi

# Disable mss-clamping service when userspace-networking is enabled
if ! bashio::config.has_value "userspace_networking" || \
bashio::config.true "userspace_networking";
then
rm /etc/s6-overlay/s6-rc.d/user/contents.d/mss-clamping
fi

Expand Down

0 comments on commit 1f519aa

Please sign in to comment.