MCPcopy Create free account
hub / github.com/tailscale/tailscale / hasOverlap

Function hasOverlap

wgengine/userspace.go:760–767  ·  view source on GitHub ↗

hasOverlap checks if there is a IPPrefix which is common amongst the two provided slices.

(aips, rips views.Slice[netip.Prefix])

Source from the content-addressed store, hash-verified

758// hasOverlap checks if there is a IPPrefix which is common amongst the two
759// provided slices.
760func hasOverlap(aips, rips views.Slice[netip.Prefix]) bool {
761 for _, aip := range aips.All() {
762 if views.SliceContains(rips, aip) {
763 return true
764 }
765 }
766 return false
767}
768
769// ResetAndStop resets the engine to a clean state (like calling Reconfig
770// with all pointers to zero values) and returns the resulting status.

Callers 1

ReconfigMethod · 0.85

Calls 2

SliceContainsFunction · 0.92
AllMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…