diff --git a/hostmap.go b/hostmap.go index b718ee5..6dc0fec 100644 --- a/hostmap.go +++ b/hostmap.go @@ -476,7 +476,7 @@ func (i *HostInfo) TryPromoteBest(preferredRanges []*net.IPNet, ifce *Interface) return } - if atomic.AddUint32(&i.promoteCounter, 1)&PromoteEvery == 0 { + if atomic.AddUint32(&i.promoteCounter, 1)%PromoteEvery == 0 { // return early if we are already on a preferred remote rIP := i.remote.IP for _, l := range preferredRanges {