Explorar o código

Fix default gw logic for internal networks

Signed-off-by: Alessandro Boch <aboch@docker.com>
Alessandro Boch %!s(int64=9) %!d(string=hai) anos
pai
achega
ff2200b397
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      libnetwork/sandbox.go

+ 8 - 0
libnetwork/sandbox.go

@@ -971,6 +971,14 @@ func (eh epHeap) Less(i, j int) bool {
 		return true
 	}
 
+	if epi.getNetwork().Internal() {
+		return false
+	}
+
+	if epj.getNetwork().Internal() {
+		return true
+	}
+
 	if ci != nil {
 		cip, ok = ci.epPriority[eh[i].ID()]
 		if !ok {