Parcourir la source

Merge pull request #317 from clive-jevons/prepend-encapsulation-rules-in-mesh

prepend encapsulation rules to reduce number of reconciliation thereof
Lucas Servén Marín il y a 3 ans
Parent
commit
cd4a1ee4e0
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      pkg/mesh/mesh.go

+ 3 - 1
pkg/mesh/mesh.go

@@ -516,7 +516,9 @@ func (m *Mesh) applyTopology() {
 				break
 				break
 			}
 			}
 		}
 		}
-		ipRules = append(ipRules, m.enc.Rules(cidrs)...)
+
+		ipRules = append(m.enc.Rules(cidrs), ipRules...)
+
 		// If we are handling local routes, ensure the local
 		// If we are handling local routes, ensure the local
 		// tunnel has an IP address.
 		// tunnel has an IP address.
 		if err := m.enc.Set(oneAddressCIDR(newAllocator(*nodes[m.hostname].Subnet).next().IP)); err != nil {
 		if err := m.enc.Set(oneAddressCIDR(newAllocator(*nodes[m.hostname].Subnet).next().IP)); err != nil {