From 96dfeb2d7f0797f504935305d1e56cb91509809c Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 22 Mar 2021 21:47:42 -0700 Subject: [PATCH] wgengine: log tailscale pings Fixes #1561 Signed-off-by: Brad Fitzpatrick --- wgengine/userspace.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wgengine/userspace.go b/wgengine/userspace.go index c9d966a99..49bc617e0 100644 --- a/wgengine/userspace.go +++ b/wgengine/userspace.go @@ -1346,14 +1346,18 @@ func (e *userspaceEngine) Ping(ip netaddr.IP, cb func(*ipnstate.PingResult)) { res := &ipnstate.PingResult{IP: ip.String()} peer, err := e.peerForIP(ip) if err != nil { + e.logf("ping(%v): %v", ip, err) res.Err = err.Error() cb(res) + return } if peer == nil { + e.logf("ping(%v): no matching peer", ip) res.Err = "no matching peer" cb(res) return } + e.logf("ping(%v): sending ping to %v %v ...", ip, peer.Key.ShortString(), peer.ComputedName) e.magicConn.Ping(peer, res, cb) }