Browse Source

Fix default gw logic for internal networks

Signed-off-by: Alessandro Boch <aboch@docker.com>
Alessandro Boch 9 years ago
parent
commit
ff2200b397
1 changed files with 8 additions and 0 deletions
  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 {