mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-21 20:22:41 +09:00
ipn/ipnstate,tailcfg: fix comment
The comment should refer to dbx.Node.IsRouter, not dbx.Node.IsSubnetRouter. Updates #cleanup Signed-off-by: Fran Bull <fran@tailscale.com>
This commit is contained in:
1 parent
3631dae2d8
commit
e982a66c01
2 files changed
+2
-2
No files matched your search
@@ -370,7 +370,7 @@ func (ps *PeerStatus) HasCap(cap nodecap.Cap) bool {
|
||||
// Examples: an exit node, a subnet router, an app connector, etc.
|
||||
// It is the analogue of [tailcfg.Node.IsRouter].
|
||||
func (ps *PeerStatus) IsRouter() bool {
|
||||
// TODO(sfllaw): Keep this aligned with dbx.Node.IsSubnetRouter.
|
||||
// TODO(sfllaw): Keep this aligned with dbx.Node.IsRouter.
|
||||
if ps.AllowedIPs == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
+1
-1
@@ -624,7 +624,7 @@ func (n *Node) DisplayNames(forOwner bool) (name, hostIfDifferent string) {
|
||||
// IsRouter reports whether n is a router: it routes addresses besides its own.
|
||||
// Examples: an exit node, a subnet router, an app connector, etc.
|
||||
func (n *Node) IsRouter() bool {
|
||||
// TODO(sfllaw): Keep this aligned with dbx.Node.IsSubnetRouter.
|
||||
// TODO(sfllaw): Keep this aligned with dbx.Node.IsRouter.
|
||||
for _, r := range n.AllowedIPs {
|
||||
if !slices.Contains(n.Addresses, r) {
|
||||
return true
|
||||
|
||||
Reference in new issue
Block a user