mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 15:07:55 +00:00
cmd/tailscale, ipn/ipnstate, wgengine/magicsock: update ping output for peer relay (#16515)
Updates the output for "tailscale ping" to indicate if a peer relay was traversed, just like the output for DERP or direct connections. Fixes tailscale/corp#30034 Signed-off-by: Dylan Bargatze <dylan@tailscale.com>
This commit is contained in:
@@ -1106,10 +1106,11 @@ func (c *Conn) Ping(peer tailcfg.NodeView, res *ipnstate.PingResult, size int, c
|
||||
func (c *Conn) populateCLIPingResponseLocked(res *ipnstate.PingResult, latency time.Duration, ep epAddr) {
|
||||
res.LatencySeconds = latency.Seconds()
|
||||
if ep.ap.Addr() != tailcfg.DerpMagicIPAddr {
|
||||
// TODO(jwhited): if ep.vni.isSet() we are using a Tailscale client
|
||||
// as a UDP relay; update PingResult and its interpretation by
|
||||
// "tailscale ping" to make this clear.
|
||||
res.Endpoint = ep.String()
|
||||
if ep.vni.isSet() {
|
||||
res.PeerRelay = ep.String()
|
||||
} else {
|
||||
res.Endpoint = ep.String()
|
||||
}
|
||||
return
|
||||
}
|
||||
regionID := int(ep.ap.Port())
|
||||
|
Reference in New Issue
Block a user