wgengine: log tailscale pings

Fixes #1561

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/1569/head
Brad Fitzpatrick 4 years ago
parent 85138d3183
commit 96dfeb2d7f

@ -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)
}

Loading…
Cancel
Save