Forráskód Böngészése

Merge pull request #1143 from aboch/sec

Fix default gw logic for internal networks
Jana Radhakrishnan 9 éve
szülő
commit
c7bf58cf47
1 módosított fájl, 8 hozzáadás és 0 törlés
  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
 		return true
 	}
 	}
 
 
+	if epi.getNetwork().Internal() {
+		return false
+	}
+
+	if epj.getNetwork().Internal() {
+		return true
+	}
+
 	if ci != nil {
 	if ci != nil {
 		cip, ok = ci.epPriority[eh[i].ID()]
 		cip, ok = ci.epPriority[eh[i].ID()]
 		if !ok {
 		if !ok {