Skip to content

fix(control): carry runtime routes and hostname on every map request #663

Closed

Description

@GeiserX

After #662, every map request carries the last advertised endpoints. Runtime routes and hostname are still not carried the same way.

SetRoutableIPs and SetHostname send the new value once. The next SetDerpHomeRegion or SetEndpoints request, and the Hostinfo update after every reconnect, build from config.advertised_routes() and config.hostname instead. Control then reverts them to the start-up config.

Go builds every map request from one current copy of the node's state (c.hostinfo, c.endpoints; control/controlclient/direct.go at tailscale/tailscale 3bb8a906). The fix here is the same: keep the runtime routes and hostname in the carried state next to the endpoints, and build every request from it. CarriedNetInfo would then be better named CarriedNodeState.

Done when a SetRoutableIPs followed by a SetDerpHomeRegion sends the runtime routes in both requests, with a test that fails on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions