Do not perform the overlap check on user chosen pool
- As it was before Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
3ec7568121
commit
8c2a2ff471
1 changed files with 3 additions and 4 deletions
|
@ -1123,10 +1123,9 @@ func (n *network) requestPoolHelper(ipam ipamapi.Ipam, addressSpace, preferredPo
|
|||
return "", nil, nil, err
|
||||
}
|
||||
|
||||
// If the network belongs to global scope or the pool
|
||||
// returned is invalid, no need to perform overlap
|
||||
// check.
|
||||
if n.Scope() == datastore.GlobalScope || !types.IsIPNetValid(pool) {
|
||||
// If the network belongs to global scope or the pool was
|
||||
// explicitely chosen or it is invalid, do not perform the overlap check.
|
||||
if n.Scope() == datastore.GlobalScope || preferredPool != "" || !types.IsIPNetValid(pool) {
|
||||
return poolID, pool, meta, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue