Skip to content

Commit

Permalink
Merge 96e5ab1 into backport/pfnr-networking-fix/ultimately-just-shrew
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-nomad-core committed Mar 9, 2023
2 parents 1560f16 + 96e5ab1 commit 58c0c21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nomad/structs/bitmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (b Bitmap) IndexesInRangeFiltered(set bool, from, to uint, filter []int) []
var indexes []int
for i := from; i <= to && i < b.Size(); i++ {
c := b.Check(i)
if c && set || !c && !set {
if c == set {
if len(filter) < 1 || !slices.Contains(filter, int(i)) {
indexes = append(indexes, int(i))
}
Expand Down
2 changes: 1 addition & 1 deletion nomad/structs/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ func getDynamicPortsStochastic(nodeUsed Bitmap, portsInOffer []int, minDynamicPo
}
// the pick conflicted with a previous pick that hasn't been saved to
// the index yet
if portsInOffer != nil && slices.Contains(portsInOffer, randPort) {
if slices.Contains(portsInOffer, randPort) {
goto PICK
}

Expand Down

0 comments on commit 58c0c21

Please sign in to comment.