mirror of
https://github.com/tailscale/tailscale.git
synced 2026-10-09 03:42:01 -04:00
ipn/{ipnext,ipnlocal},feature/conn25: add ExtraDNSRoutes hook for conn25 split DNS
dnsConfigForNetmap called appc.AppDNSRoutes directly to synthesize the conn25 split DNS routes from the self node's capability map, which was the one place node_backend.go depended on the appc package and was marked with a TODO to make it a hook. Add ipnext.Hooks.ExtraDNSRoutes, which returns extension-supplied split DNS routes. authReconfigLocked calls it and passes the result into dnsConfigForNetmap, which adds the routes alongside the netmap's own routes with the same UseWithExitNode handling as before. The hook takes no arguments: the conn25 extension computes the routes in its OnSelfChange handler and clears them on a switch to a different node, and it already tracks the AppConnector.Advertise pref from ProfileStateChange. Both of those hooks fire before the reconfig that consults ExtraDNSRoutes, so the state is current. The conditions are unchanged: no routes when this node itself advertises as an app connector, and none without the experimental capability. Updates tailscale/corp#37125 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Change-Id: I6c2e9f4b8a1d3e7f5c0b2a9d8e6f4c3b1a7d5e9f
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f