mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #37949 from selansen/master
Fix for default-addr-pool-mask-length param max value check
This commit is contained in:
commit
192ff56d87
1 changed files with 6 additions and 1 deletions
|
@ -99,7 +99,12 @@ func validateDefaultAddrPool(defaultAddrPool []string, size uint32) error {
|
|||
if size == 0 {
|
||||
size = 24
|
||||
}
|
||||
if size > 32 {
|
||||
// We allow max value as 29. We can have 8 IP addresses for max value 29
|
||||
// If we allow 30, then we will get only 4 IP addresses. But with latest
|
||||
// libnetwork LB scale implementation, we use total of 4 IP addresses for internal use.
|
||||
// Hence keeping 29 as max value, we will have 8 IP addresses. This will be
|
||||
// smallest subnet that can be used in overlay network.
|
||||
if size > 29 {
|
||||
return fmt.Errorf("subnet size is out of range: %d", size)
|
||||
}
|
||||
for i := range defaultAddrPool {
|
||||
|
|
Loading…
Add table
Reference in a new issue