aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/route.c
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2023-01-30 21:14:39 +0000
committerMauro Sardara <msardara@cisco.com>2023-02-13 09:26:06 +0000
commitc46b82460987912eb465187892286922aeaedab4 (patch)
tree340369094db2fcc8023668f924d8e561547714bb /hicn-plugin/src/route.c
parentdf902fa5ea07a0de312b1b6dd138e360611e5769 (diff)
feat(hicn-plugin): handle case of no exact match for mapme IU
Ticket: HICN-844 Change-Id: I1f046e6327e4cf507b7fa7a5adae53e63ab491bf Signed-off-by: Mauro Sardara <msardara@cisco.com> (cherry picked from commit 7cfd91a6c6316fe15186c8cd3acc1c4526db7e25)
Diffstat (limited to 'hicn-plugin/src/route.c')
-rw-r--r--hicn-plugin/src/route.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/hicn-plugin/src/route.c b/hicn-plugin/src/route.c
index 2509628d9..fa95f7265 100644
--- a/hicn-plugin/src/route.c
+++ b/hicn-plugin/src/route.c
@@ -370,7 +370,9 @@ disable_data_receiving_rm_fib_entry (vnet_main_t *vnm, vnet_sw_interface_t *si,
}
int
-hicn_route_enable (const fib_prefix_t *prefix, hicn_face_id_t **pvec_faces)
+hicn_route_enable (const fib_prefix_t *prefix,
+ fib_node_index_t *hicn_fib_node_index,
+ hicn_face_id_t **pvec_faces)
{
int ret = HICN_ERROR_NONE;
@@ -398,10 +400,9 @@ hicn_route_enable (const fib_prefix_t *prefix, hicn_face_id_t **pvec_faces)
/* Check if the prefix is already enabled */
u32 fib_hicn_index = fib_table_find (prefix->fp_proto, HICN_FIB_TABLE);
- fib_node_index_t fib_hicn_entry_index =
- fib_table_lookup_exact_match (fib_hicn_index, prefix);
+ *hicn_fib_node_index = fib_table_lookup_exact_match (fib_hicn_index, prefix);
- if (fib_hicn_entry_index == FIB_NODE_INDEX_INVALID)
+ if (*hicn_fib_node_index == FIB_NODE_INDEX_INVALID)
{
HICN_DEBUG (
"No route found for %U. Creating DPO and tracking fib prefix.",
@@ -442,10 +443,9 @@ hicn_route_enable (const fib_prefix_t *prefix, hicn_face_id_t **pvec_faces)
* to match Neale suggested -- FIB_SOURCE_HICN the client
* that is adding them -- no easy explanation at this timeā€¦
*/
- CLIB_UNUSED (fib_node_index_t new_fib_node_index) =
- fib_table_entry_special_dpo_add (
- fib_hicn_index, prefix, hicn_fib_src,
- (FIB_ENTRY_FLAG_EXCLUSIVE | FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT), &dpo);
+ *hicn_fib_node_index = fib_table_entry_special_dpo_add (
+ fib_hicn_index, prefix, hicn_fib_src,
+ (FIB_ENTRY_FLAG_EXCLUSIVE | FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT), &dpo);
HICN_DEBUG ("Calling sync_hicn_fib_entry");
sync_hicn_fib_entry (fib_entry, pvec_faces);
@@ -477,7 +477,7 @@ hicn_route_enable (const fib_prefix_t *prefix, hicn_face_id_t **pvec_faces)
/* Route already existing. We need to update the dpo. */
load_balance_dpo_id =
- fib_entry_contribute_ip_forwarding (fib_hicn_entry_index);
+ fib_entry_contribute_ip_forwarding (*hicn_fib_node_index);
/* The dpo is not a load balance dpo as expected */
if (load_balance_dpo_id->dpoi_type != DPO_LOAD_BALANCE)