Skip to content

Commit c66afe4

Browse files
Aritra Basusknat
authored andcommitted
vxlan: use remote next-hop gateway for pod CIDR tunnel routes
Commit 47563a4 changed VXLAN pod-CIDR routes from `Gw: nodeIP` to `Gw: nil` to avoid local-IP adj-sourced side effects and UNRESOLVED encap DPO issues. `Gw: nil` is valid for IPIP (P2P tunnel semantics), but VXLAN is non-P2P. VXLAN tunnels in VPP lack `VNET_HW_INTERFACE_CLASS_FLAG_P2P` (unlike IPIP). With `Gw:nil` on a non-P2P interface, VPP creates an attached/glean FIB entry (`FIB_PATH_TYPE_ATTACHED`) and attempts NDP for each destination directly on the VXLAN tunnel which triggers unresolved neighbor resolution behavior on the tunnel path. Fixed the code to use `cn.NextHop` (remote node IP / tunnel destination) as the gateway. This creates `FIB_PATH_TYPE_ATTACHED_NEXT_HOP`, which resolves via NDP on the uplink (tunnel is unnumbered) and does not conflict with the encap DPO since the remote IP has no local receive route. Signed-off-by: Aritra Basu <aritrbas@cisco.com>
1 parent f6d842a commit c66afe4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

calico-vpp-agent/connectivity/vxlan.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func (p *VXLanProvider) AddConnectivity(cn *common.NodeConnectivity) error {
211211
})
212212
if err != nil {
213213
// TODO : delete tunnel
214-
return errors.Wrapf(err, "Error adding route to %s in ipip tunnel %d for pods", cn.NextHop.String(), swIfIndex)
214+
return errors.Wrapf(err, "Error adding route to %s in vxlan tunnel %d for pods", cn.NextHop.String(), swIfIndex)
215215
}
216216
}
217217

@@ -261,7 +261,7 @@ func (p *VXLanProvider) AddConnectivity(cn *common.NodeConnectivity) error {
261261
Dst: &cn.Dst,
262262
Paths: []types.RoutePath{{
263263
SwIfIndex: tunnel.SwIfIndex,
264-
Gw: nil,
264+
Gw: cn.NextHop,
265265
}},
266266
Table: table,
267267
}
@@ -286,7 +286,7 @@ func (p *VXLanProvider) DelConnectivity(cn *common.NodeConnectivity) error {
286286
Dst: &cn.Dst,
287287
Paths: []types.RoutePath{{
288288
SwIfIndex: tunnel.SwIfIndex,
289-
Gw: nil,
289+
Gw: cn.NextHop,
290290
}},
291291
}
292292
} else {
@@ -296,7 +296,7 @@ func (p *VXLanProvider) DelConnectivity(cn *common.NodeConnectivity) error {
296296
Dst: &cn.Dst,
297297
Paths: []types.RoutePath{{
298298
SwIfIndex: tunnel.SwIfIndex,
299-
Gw: nil,
299+
Gw: cn.NextHop,
300300
}},
301301
Table: vrfIndex,
302302
}

0 commit comments

Comments
 (0)