ipnlocal, magicsock: store last suggested exit node id in local backend (#11959)

Updates tailscale/corp#19681

Signed-off-by: Claire Wang <claire@tailscale.com>
This commit is contained in:
Claire Wang
2024-05-03 13:24:26 -04:00
committed by GitHub
parent b62cfc430a
commit 35872e86d2
3 changed files with 401 additions and 3 deletions

View File

@@ -3088,3 +3088,9 @@ func (c *Conn) GetLastNetcheckReport(ctx context.Context) *netcheck.Report {
}
return lastReport
}
// SetLastNetcheckReport sets local backend's last netcheck report.
// Used for testing purposes.
func (c *Conn) SetLastNetcheckReport(ctx context.Context, report netcheck.Report) {
c.lastNetCheckReport.Store(&report)
}