mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 14:43:19 +00:00
feature/taildrop: move rest of Taildrop out of LocalBackend
Updates #12614 Change-Id: If451dec1d796f6a4216fe485975c87f0c62a53e5 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Co-authored-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
cf6a593196
commit
068d5ab655
@@ -148,6 +148,14 @@ func (nm *NetworkMap) GetIPVIPServiceMap() IPServiceMappings {
|
||||
return res
|
||||
}
|
||||
|
||||
// SelfNodeOrZero returns the self node, or a zero value if nm is nil.
|
||||
func (nm *NetworkMap) SelfNodeOrZero() tailcfg.NodeView {
|
||||
if nm == nil {
|
||||
return tailcfg.NodeView{}
|
||||
}
|
||||
return nm.SelfNode
|
||||
}
|
||||
|
||||
// AnyPeersAdvertiseRoutes reports whether any peer is advertising non-exit node routes.
|
||||
func (nm *NetworkMap) AnyPeersAdvertiseRoutes() bool {
|
||||
for _, p := range nm.Peers {
|
||||
|
Reference in New Issue
Block a user