mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +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,8 +442,10 @@ func (e *AppConnector) ObserveDNSResponse(res []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
e.logf("[v2] observed new routes for %s: %s", domain, toAdvertise)
|
||||
e.scheduleAdvertisement(domain, toAdvertise...)
|
||||
if len(toAdvertise) > 0 {
|
||||
e.logf("[v2] observed new routes for %s: %s", domain, toAdvertise)
|
||||
e.scheduleAdvertisement(domain, toAdvertise...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user