mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-20 11:58:39 +00:00
wgengine: adjust debug logging for WireGuard-only peers
Updates #cleanup Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
1a64166073
commit
17ce75347c
@ -146,13 +146,15 @@ func (e *userspaceEngine) onOpenTimeout(flow flowtrack.Tuple) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
n := pip.Node
|
n := pip.Node
|
||||||
if n.DiscoKey.IsZero() {
|
if !n.IsWireGuardOnly {
|
||||||
e.logf("open-conn-track: timeout opening %v; peer node %v running pre-0.100", flow, n.Key.ShortString())
|
if n.DiscoKey.IsZero() {
|
||||||
return
|
e.logf("open-conn-track: timeout opening %v; peer node %v running pre-0.100", flow, n.Key.ShortString())
|
||||||
}
|
return
|
||||||
if n.DERP == "" {
|
}
|
||||||
e.logf("open-conn-track: timeout opening %v; peer node %v not connected to any DERP relay", flow, n.Key.ShortString())
|
if n.DERP == "" {
|
||||||
return
|
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)
|
ps, found := e.getPeerStatusLite(n.Key)
|
||||||
@ -187,15 +189,19 @@ func (e *userspaceEngine) onOpenTimeout(flow flowtrack.Tuple) {
|
|||||||
_ = ps.LastHandshake
|
_ = ps.LastHandshake
|
||||||
|
|
||||||
online := "?"
|
online := "?"
|
||||||
if n.Online != nil {
|
if n.IsWireGuardOnly {
|
||||||
if *n.Online {
|
online = "wg"
|
||||||
online = "yes"
|
} else {
|
||||||
} else {
|
if n.Online != nil {
|
||||||
online = "no"
|
if *n.Online {
|
||||||
|
online = "yes"
|
||||||
|
} else {
|
||||||
|
online = "no"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if n.LastSeen != nil && online != "yes" {
|
||||||
|
online += fmt.Sprintf(", lastseen=%v", durFmt(*n.LastSeen))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
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",
|
e.logf("open-conn-track: timeout opening %v to node %v; online=%v, lastRecv=%v",
|
||||||
flow, n.Key.ShortString(),
|
flow, n.Key.ShortString(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user