projectcalico / calico

Cloud native networking and network security
https://docs.tigera.io/calico/latest/about/
Apache License 2.0
6.04k stars 1.35k forks source link

[release-v3.29] Auto pick #9416: Fix vxlan cross-subnet routes in pure V6 env #9430

Closed tomastigera closed 3 weeks ago

tomastigera commented 3 weeks ago

Cherry pick of #9416 on release-v3.29.

9416: Fix vxlan cross-subnet routes in pure V6 env

Original PR Body below

In a pure V6 env, nodes do not have v4 addresses and thus testing localNodeInfo.V4CIDR.ContainsV4(nodeInfo.V4Addr) is always true and sameV4 || sameV6 would also always evaluate to true.

It is better to evaluate nodeInOurSubnet separately for each IP family.

fixes https://github.com/projectcalico/calico/issues/9403

Description

Related issues/PRs

Todos

Release Note

Fix missing routes when vxlan mode is cross-subnet and the environment is purely V6 (no V4 host addresses)

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

Every PR needs one release-note-* label.

Other optional labels: