mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-10 11:14:21 +02:00
mapper: produce map before poll (#2628)
This commit is contained in:
@@ -431,6 +431,11 @@ func (node *Node) SubnetRoutes() []netip.Prefix {
|
||||
return routes
|
||||
}
|
||||
|
||||
// IsSubnetRouter reports if the node has any subnet routes.
|
||||
func (node *Node) IsSubnetRouter() bool {
|
||||
return len(node.SubnetRoutes()) > 0
|
||||
}
|
||||
|
||||
func (node *Node) String() string {
|
||||
return node.Hostname
|
||||
}
|
||||
@@ -669,6 +674,13 @@ func (v NodeView) SubnetRoutes() []netip.Prefix {
|
||||
return v.ж.SubnetRoutes()
|
||||
}
|
||||
|
||||
func (v NodeView) IsSubnetRouter() bool {
|
||||
if !v.Valid() {
|
||||
return false
|
||||
}
|
||||
return v.ж.IsSubnetRouter()
|
||||
}
|
||||
|
||||
func (v NodeView) AppendToIPSet(build *netipx.IPSetBuilder) {
|
||||
if !v.Valid() {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user