tailscale/net/tstun
Maisem Ali 3ae7140690 net/tstun: handle exit nodes in NAT configs
In the case where the exit node requires SNAT, we would SNAT all traffic not just the
traffic meant to go through the exit node. This was a result of the default route being
added to the routing table which would match basically everything.

In this case, we need to account for all peers in the routing table not just the ones
that require NAT.

Fix and add a test.

Updates tailscale/corp#8020

Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-05-02 13:03:30 -07:00
..
table net/tstun/table: add initial RoutingTable implementation 2023-03-29 12:30:18 -07:00
fake.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ifstatus_noop.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ifstatus_windows.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
linkattrs_linux.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
linkattrs_notlinux.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
mtu_test.go envknob,net/tstun,wgengine: use TS_DEBUG_MTU consistently 2023-03-30 14:26:10 -07:00
mtu.go envknob,net/tstun,wgengine: use TS_DEBUG_MTU consistently 2023-03-30 14:26:10 -07:00
tap_linux.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tap_unsupported.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tun_linux.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tun_macos.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tun_notwindows.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tun_windows.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tun.go envknob,net/tstun,wgengine: use TS_DEBUG_MTU consistently 2023-03-30 14:26:10 -07:00
wrap_test.go net/tstun: handle exit nodes in NAT configs 2023-05-02 13:03:30 -07:00
wrap.go net/tstun: handle exit nodes in NAT configs 2023-05-02 13:03:30 -07:00