MCPcopy Create free account
hub / github.com/tailscale/tailcat / nodeHasAddr

Function nodeHasAddr

tailcat.go:1149–1159  ·  view source on GitHub ↗

nodeHasAddr reports whether ip is one of n's tailcat addresses.

(n tailcfg.NodeView, ip netip.Addr)

Source from the content-addressed store, hash-verified

1147
1148// nodeHasAddr reports whether ip is one of n's tailcat addresses.
1149func nodeHasAddr(n tailcfg.NodeView, ip netip.Addr) bool {
1150 if !n.Valid() {
1151 return false
1152 }
1153 for _, pfx := range n.Addresses().All() {
1154 if pfx.Addr() == ip {
1155 return true
1156 }
1157 }
1158 return false
1159}
1160
1161func (lb *locoBackend) Start() error {
1162 if err := lb.ns.Start(nil /* no LocalBackend */); err != nil {

Callers 1

peerForIPMethod · 0.85

Calls 1

AddrMethod · 0.80

Tested by

no test coverage detected