|
|
|
@ -1961,12 +1961,13 @@ func (de *endpoint) populatePeerStatus(ps *ipnstate.PeerStatus) {
|
|
|
|
ps.Active = now.Sub(de.lastSendExt) < sessionActiveTimeout
|
|
|
|
ps.Active = now.Sub(de.lastSendExt) < sessionActiveTimeout
|
|
|
|
|
|
|
|
|
|
|
|
if udpAddr, derpAddr, _ := de.addrForSendLocked(now); udpAddr.ap.IsValid() && !derpAddr.IsValid() {
|
|
|
|
if udpAddr, derpAddr, _ := de.addrForSendLocked(now); udpAddr.ap.IsValid() && !derpAddr.IsValid() {
|
|
|
|
// TODO(jwhited): if udpAddr.vni.isSet() we are using a Tailscale client
|
|
|
|
if udpAddr.vni.isSet() {
|
|
|
|
// as a UDP relay; update PeerStatus and its interpretation by
|
|
|
|
ps.PeerRelay = udpAddr.String()
|
|
|
|
// "tailscale status" to make this clear.
|
|
|
|
} else {
|
|
|
|
ps.CurAddr = udpAddr.String()
|
|
|
|
ps.CurAddr = udpAddr.String()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// stopAndReset stops timers associated with de and resets its state back to zero.
|
|
|
|
// stopAndReset stops timers associated with de and resets its state back to zero.
|
|
|
|
// It's called when a discovery endpoint is no longer present in the
|
|
|
|
// It's called when a discovery endpoint is no longer present in the
|
|
|
|
|