mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-23 17:18:42 +00:00
wgengine, ipn: include number of active DERPs in status
Use this when making the ipn state transition from Starting to Running. This way a network of quiet nodes with no active handshaking will still transition to Active. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
@@ -1080,6 +1080,14 @@ func (c *Conn) cleanStaleDerp() {
|
||||
}
|
||||
}
|
||||
|
||||
// DERPs reports the number of active DERP connections.
|
||||
func (c *Conn) DERPs() int {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
|
||||
return len(c.activeDerp)
|
||||
}
|
||||
|
||||
func (c *Conn) SetMark(value uint32) error { return nil }
|
||||
func (c *Conn) LastMark() uint32 { return 0 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user