Skip to content

support per-profile advertised routes (subnet router / exit node) - #16

Open
david1gp wants to merge 1 commit into
maisem:mainfrom
david1gp:advertise-routes
Open

david1gp wants to merge 1 commit into
maisem:mainfrom
david1gp:advertise-routes

Conversation

@david1gp

@david1gp david1gp commented Nov 6, 2026

Copy link
Copy Markdown

Follows up on #15, which describes the proposal and prior-art check. This implements it; see the issue for design and interface discussion.

What it does: desired routes persist in profile state and converge through the supervisor reconcile loop onto engine prefs, which control lists for approval like a normal node. Daemon-owned scoped FORWARD/MASQUERADE forwarding on Linux with full teardown; refuses while tailscaled runs and outside Linux TUN mode. CLI: tailmix advertise list/set/clear --profile. Effective IPs stay unadvertised.

Tests included (engine round-trip, reconcile converge/clear, hosttun rules, CLI, controlapi, state). Gates: go vet, staticcheck, tidy, licenses-check, install-test clean; go test passes except pre-existing environmental TestHeldTCPContinuation, which fails on clean main too.

…routes

Allow each profile to advertise subnet routes and exit-node default routes into its tailnet. Desired routes persist in profile state and converge through the supervisor reconcile loop onto the engine prefs, which control then lists for approval like a normal node.

The daemon owns the forwarding plane on Linux: scoped FORWARD and MASQUERADE rules per advertised prefix on the shared host TUN plus IP forwarding sysctl checks, all torn down on clear, remove, or disable. Advertising refuses while tailscaled runs and outside Linux TUN mode. The CLI gains tailmix advertise list/set/clear.

Change-Id: Ieeea036af9a23a2086ef40f1717cd781062bb922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant