Browse Source

Merge pull request #1143 from aboch/sec

Fix default gw logic for internal networks
Jana Radhakrishnan 9 năm trước cách đây
mục cha
commit
c7bf58cf47
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  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 {