Skip to content

Commit

Permalink
fix: networkIsValid refuse nodes with children
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 committed Dec 4, 2024
1 parent 1854a5e commit b1773bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ipam/core/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ func (ipam *Ipam) NetworkIsAvailable(prefix netip.Prefix) bool {
if node == nil {
return true
}
if node.left != nil || node.right != nil {
return false
}
return !node.acquired
}

Expand Down

0 comments on commit b1773bf

Please sign in to comment.