aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/route.c
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2023-01-19 13:33:57 +0000
committerMauro Sardara <msardara@cisco.com>2023-01-20 10:18:55 +0000
commit00b070cfbb3164df823653c7e1d32b7851cf0ee0 (patch)
treeabf40bfd2f48e082e0f5f4fa10420b7f567a6669 /hicn-plugin/src/route.c
parentce8807815b2e9c6630f639e8dc6924f0eff74775 (diff)
fix: correctly set next node for ifaces and faces
Ticket: HICN-828 Change-Id: I7853bc37e34ca4f2303a537396aef4cb8b06ec98 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-plugin/src/route.c')
-rw-r--r--hicn-plugin/src/route.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hicn-plugin/src/route.c b/hicn-plugin/src/route.c
index f89d40211..ff96e5cd7 100644
--- a/hicn-plugin/src/route.c
+++ b/hicn-plugin/src/route.c
@@ -236,6 +236,7 @@ sync_hicn_fib_entry (hicn_dpo_ctx_t *fib_entry, hicn_face_id_t **pvec_faces)
{ \
/* Careful, this adds a lock on the face if it exists */ \
hicn_face_add (dpo, nh, sw_if, &face_id); \
+ ASSERT (face_id != HICN_FACE_NULL); \
vec_validate (vec_faces, index); \
vec_faces[index] = face_id; \
(index)++; \
@@ -275,11 +276,9 @@ sync_hicn_fib_entry (hicn_dpo_ctx_t *fib_entry, hicn_face_id_t **pvec_faces)
HICN_DEBUG ("Added new HICN face: %d because of route prefix %U",
face_id, format_fib_prefix, &_fib_entry->fe_prefix);
}
- else if (dpo->dpoi_type == dpo_type_udp_ip4 ||
- dpo->dpoi_type == dpo_type_udp_ip6)
+ else if (dpo_is_udp_encap (dpo))
{
- dpo_proto_t proto =
- dpo->dpoi_type == dpo_type_udp_ip4 ? DPO_PROTO_IP4 : DPO_PROTO_IP6;
+ dpo_proto_t proto = dpo_udp_encap_get_proto (dpo);
ip46_address_t _nh = { 0 };
nh = &_nh;
switch (_fib_entry->fe_prefix.fp_proto)
@@ -298,6 +297,7 @@ sync_hicn_fib_entry (hicn_dpo_ctx_t *fib_entry, hicn_face_id_t **pvec_faces)
HICN_DEBUG ("Added new UDP face: %d because of route prefix %U",
face_id, format_fib_prefix, &_fib_entry->fe_prefix);
udp_tunnel_add_existing (dpo->dpoi_index, proto);
+ udp_tunnel_set_face (face_id, proto == DPO_PROTO_IP4);
}
else if (dpo_is_pgserver (dpo))
{