mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-22 08:51:41 +00:00
appc: don't schedule advertisement of 0 routes
When the store-appc-routes flag is on for a tailnet we are writing the routes more often than seems necessary. Investigation reveals that we are doing so ~every time we observe a dns response, even if this causes us not to advertise any new routes. So when we have no new routes, instead do not advertise routes. Fixes #12593 Signed-off-by: Fran Bull <fran@tailscale.com>
This commit is contained in:
parent
24a40f54d9
commit
7eb8a77ac8
@ -442,10 +442,12 @@ func (e *AppConnector) ObserveDNSResponse(res []byte) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(toAdvertise) > 0 {
|
||||||
e.logf("[v2] observed new routes for %s: %s", domain, toAdvertise)
|
e.logf("[v2] observed new routes for %s: %s", domain, toAdvertise)
|
||||||
e.scheduleAdvertisement(domain, toAdvertise...)
|
e.scheduleAdvertisement(domain, toAdvertise...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// starting from the given domain that resolved to an address, find it, or any
|
// starting from the given domain that resolved to an address, find it, or any
|
||||||
// of the domains in the CNAME chain toward resolving it, that are routed
|
// of the domains in the CNAME chain toward resolving it, that are routed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user