tailscale/wgengine
KevinLiang10 03461ea7fb
wgengine/netstack: add local tailscale service IPs to route and terminate locally (#18461)
* wgengine/netstack: add local tailscale service IPs to route and terminate locally

This commit adds the tailscales service IPs served locally to OS routes, and
make interception to packets so that the traffic terminates locally without
making affects to the HA traffics.

Fixes tailscale/corp#34048

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* fix test

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* add ready field to avoid accessing lb before netstack starts

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* wgengine/netstack: store values from lb to avoid acquiring a lock

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* add active services to netstack on starts with stored prefs.

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* fix comments

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* update comments

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

---------

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
2026-01-30 16:46:03 -05:00
..
bench all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
filter all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
magicsock wgengine/magicsock: make debugNeverDirectUDP influence remote peer decisions 2026-01-30 13:16:46 -08:00
netlog all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netstack wgengine/netstack: add local tailscale service IPs to route and terminate locally (#18461) 2026-01-30 16:46:03 -05:00
router all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
wgcfg all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
wgint all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
wglog all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
winnet all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
mem_ios.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pendopen_omit.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pendopen.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
userspace_ext_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
userspace_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
userspace.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
watchdog_omit.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
watchdog_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
watchdog.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
wgengine.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00