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

prepend encapsulation rules to reduce number of reconciliation thereof
This commit is contained in:
Lucas Servén Marín 2022-07-14 11:09:55 +02:00 committed by GitHub
commit cd4a1ee4e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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