Skip to content

Commit

Permalink
Small bug fixes for per-cluster CT and SNAT map
Browse files Browse the repository at this point in the history
- Define Map macro for per-cluster SNAT maps
- Fix wrong if condition in per-cluster CT map initialization

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
  • Loading branch information
YutaroHayakawa committed Mar 22, 2023
1 parent cf0eae1 commit f1ed5fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/datapath/linux/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ func (h *HeaderfileWriter) WriteNodeConfig(w io.Writer, cfg *datapath.LocalNodeC
cDefinesMap["PER_CLUSTER_CT_TCP6"] = "cilium_per_cluster_ct_tcp6"
cDefinesMap["PER_CLUSTER_CT_ANY4"] = "cilium_per_cluster_ct_any4"
cDefinesMap["PER_CLUSTER_CT_ANY6"] = "cilium_per_cluster_ct_any6"
cDefinesMap["PER_CLUSTER_SNAT_MAPPING_IPV4"] = "cilium_per_cluster_snat_v4_external"
cDefinesMap["PER_CLUSTER_SNAT_MAPPING_IPV6"] = "cilium_per_cluster_snat_v6_external"

if option.Config.PreAllocateMaps {
cDefinesMap["PREALLOCATE_MAPS"] = "1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/maps/ctmap/per_cluster_ctmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (gm *perClusterCTMaps) UpdateClusterCTMaps(clusterID uint32) error {
}
}

if gm.ipv4 {
if gm.ipv6 {
if err := gm.tcp6.updateClusterCTMap(clusterID); err != nil {
return err
}
Expand Down

0 comments on commit f1ed5fd

Please sign in to comment.