aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/route.c
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2023-01-20 10:22:54 +0000
committerGerrit Code Review <gerrit@fd.io>2023-01-20 10:22:54 +0000
commit6e41f3a43bccd768a4a633706f9028114ab58b83 (patch)
tree7ce07435cfc34c79aadf4dbd68a0c3b4b6319a61 /hicn-plugin/src/route.c
parent30082b9a4180dce68da04f67fb5bbb34fa2ba842 (diff)
parent00b070cfbb3164df823653c7e1d32b7851cf0ee0 (diff)
Merge "fix: correctly set next node for ifaces and faces"
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))
{