Skip to content

Commit

Permalink
fix: when staticPool's lower bound equal pools lower bound, it should…
Browse files Browse the repository at this point in the history
… be legal.
  • Loading branch information
brianchennn committed Nov 12, 2023
1 parent 1be9308 commit 444cb53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/context/ue_ip_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RETURNIP:
func (ueIPPool *UeIPPool) exclude(excludePool *UeIPPool) error {
excludeMin := excludePool.pool.Min()
excludeMax := excludePool.pool.Max() + 1
if !ueIPPool.ueSubNet.IP.Equal(excludePool.ueSubNet.IP) {
if ueIPPool.pool.Min() != excludeMin {
excludeMin -= 1
}
if err := ueIPPool.pool.Reserve(excludeMin, excludeMax); err != nil {
Expand Down

0 comments on commit 444cb53

Please sign in to comment.