appc,ipn/ipnlocal,types/appctype: implement control provided routes

Control can now send down a set of routes along with the domains, and
the routes will be advertised, with any newly overlapped routes being
removed to reduce the size of the routing table.

Fixes tailscale/corp#16833
Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
James Tucker
2024-01-17 11:35:55 -08:00
committed by James Tucker
parent 543e7ed596
commit 24df1ef1ee
5 changed files with 159 additions and 2 deletions

View File

@@ -66,6 +66,8 @@ type AppConnectorAttr struct {
// Domains enumerates the domains serviced by the specified app connectors.
// Domains can be of the form: example.com, or *.example.com.
Domains []string `json:"domains,omitempty"`
// Routes enumerates the predetermined routes to be advertised by the specified app connectors.
Routes []netip.Prefix `json:"routes,omitempty"`
// Connectors enumerates the app connectors which service these domains.
// These can either be "*" to match any advertising connector, or a
// tag of the form tag:<tag-name>.