This commit is contained in:
Wade Simmons
2026-02-12 12:16:16 -05:00
parent f573e8a266
commit 2190c04201
15 changed files with 14 additions and 39 deletions

View File

@@ -404,12 +404,7 @@ func (r *RemoteList) Rebuild(preferredRanges []netip.Prefix) {
// unlockedIsBad assumes you have the write lock and checks if the remote matches any entry in the blocked address list
func (r *RemoteList) unlockedIsBad(remote netip.AddrPort) bool {
for _, v := range r.badRemotes {
if v == remote {
return true
}
}
return false
return slices.Contains(r.badRemotes, remote)
}
// unlockedSetLearnedV4 assumes you have the write lock and sets the current learned address for this owner and marks the