wgengine: adjust debug logging for WireGuard-only peers

Updates #cleanup

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/8895/head
Brad Fitzpatrick 10 months ago committed by Brad Fitzpatrick
parent 1a64166073
commit 17ce75347c

@ -146,6 +146,7 @@ func (e *userspaceEngine) onOpenTimeout(flow flowtrack.Tuple) {
return
}
n := pip.Node
if !n.IsWireGuardOnly {
if n.DiscoKey.IsZero() {
e.logf("open-conn-track: timeout opening %v; peer node %v running pre-0.100", flow, n.Key.ShortString())
return
@ -154,6 +155,7 @@ func (e *userspaceEngine) onOpenTimeout(flow flowtrack.Tuple) {
e.logf("open-conn-track: timeout opening %v; peer node %v not connected to any DERP relay", flow, n.Key.ShortString())
return
}
}
ps, found := e.getPeerStatusLite(n.Key)
if !found {
@ -187,6 +189,9 @@ func (e *userspaceEngine) onOpenTimeout(flow flowtrack.Tuple) {
_ = ps.LastHandshake
online := "?"
if n.IsWireGuardOnly {
online = "wg"
} else {
if n.Online != nil {
if *n.Online {
online = "yes"
@ -197,6 +202,7 @@ func (e *userspaceEngine) onOpenTimeout(flow flowtrack.Tuple) {
if n.LastSeen != nil && online != "yes" {
online += fmt.Sprintf(", lastseen=%v", durFmt(*n.LastSeen))
}
}
e.logf("open-conn-track: timeout opening %v to node %v; online=%v, lastRecv=%v",
flow, n.Key.ShortString(),
online,

Loading…
Cancel
Save