mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Prioritize nw endpoint which can provide both v4 and v6 connectivity
- when selecting sandbox's default gw Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
ac7deb041b
commit
cdd56ba07e
1 changed files with 11 additions and 0 deletions
|
@ -1174,6 +1174,17 @@ func (eh epHeap) Less(i, j int) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if epi.joinInfo != nil && epj.joinInfo != nil {
|
||||||
|
if (epi.joinInfo.gw != nil && epi.joinInfo.gw6 != nil) &&
|
||||||
|
(epj.joinInfo.gw == nil || epj.joinInfo.gw6 == nil) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (epj.joinInfo.gw != nil && epj.joinInfo.gw6 != nil) &&
|
||||||
|
(epi.joinInfo.gw == nil || epi.joinInfo.gw6 == nil) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ci != nil {
|
if ci != nil {
|
||||||
cip, ok = ci.epPriority[eh[i].ID()]
|
cip, ok = ci.epPriority[eh[i].ID()]
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Add table
Reference in a new issue