Files
Brad Fitzpatrick f34a3fd86c wgengine/{tswg,router/osrouter}: make MagicDNS work in kernel mode
In kernel mode, the tswg device doesn't hand tailscaled packets, so
those to the Tailscale service IPs (100.100.100.100 and
fd7a:115c:a1e0::53: MagicDNS, the web client and so on), which the
router routes to tailscale0, went nowhere.

Rather than teach the kernel about them, the tun.Device that tswg gives
tailscaled's TUN wrapper is now a real TUN device, tailscale0-svc,
instead of a fake, and the Linux router sends just the routes to the
service IPs there, when the device says it has one (serviceTUN). So
netstack answers them as in TUN mode, with its replies going back to
the OS through it. Nothing else is routed to it.

TestTSWGTailscaledMagicDNS checks queries to both service IPs, over UDP
and TCP, for a control-provided record and a peer's name, and fails
without the router change. For it, tta gets /dns-lookup, which asks a
given DNS server directly, as gokrazy has no resolver tools.

Updates #426

Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: Id34c54a91eb211cc6353cdbc83a2501f927b237e
2026-11-09 15:47:37 +00:00
..
2026-07-10 14:26:11 -07:00
2026-07-10 14:26:11 -07:00
2026-07-10 14:26:11 -07:00