Files
tsunagi/docs
Aleksandr Bogomiakov e7de9b44af Keep forwarded exit traffic on the gateway’s own uplink
When A selects B and B selects C, B’s own default route must not carry A’s
forwarded packets on to C. Accept only locally sourced overlay traffic for
the client default, while keeping authenticated member traffic on the
physical uplink from its first packet. Replies still route to the owning
member. Switching B’s default does not tear down A’s existing flows.

On Linux, distinguish forwarded packets and SNAT replies from local
traffic, including strict reverse-path checks when the agent runs as
root. On macOS, tag packets on the offered utun and keep their PF NAT
state on the physical interface. On Windows, use interface-bound sockets
and a bounded smoltcp TCP endpoint, UDP flow mappings and ICMP echo. An
offer and its live sockets survive changes to the client's split routes
and transient uplink discovery failures. Remove only owned legacy WinNAT
objects. Document the supported IPv4 protocols and resource limits.

Real WireGuard agents exercised A, B and C. Two Linux ARM64 namespace
tests passed in an isolated Colima container with strict reverse-path
filtering. The same destination saw A keep its physical SNAT TCP session
while B's local connections switched to C and back. Strict Linux core
Clippy passed. Six portable socket regressions passed on macOS, including
TCP resets, both half-close orders, UDP port stability and resource limits.

The macOS PF rules passed native syntax checking and the Windows target
cross-compiled on macOS. Extended privileged macOS and Windows fixtures
are available in CI; neither native system routing test ran on this host.
2026-11-25 19:34:27 +02:00
..