diff options
author | Luca Muscariello <muscariello@ieee.org> | 2023-01-10 16:48:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2023-01-10 16:48:16 +0000 |
commit | 8adfb21bf73bdb4c77d04a9c8005bd9008dd52ca (patch) | |
tree | f3625410471076ae07e0cfb4c8b5209459609918 /hicn-plugin/src/route.c | |
parent | c31c2eab0ef33df0bf1d46238b7509d1429b110e (diff) | |
parent | 55d06ad1cd4f64fc7382bcaf14dc57c1f16db8fe (diff) |
Merge "feat: upgrade to VPP 22.10"
Diffstat (limited to 'hicn-plugin/src/route.c')
-rw-r--r-- | hicn-plugin/src/route.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/hicn-plugin/src/route.c b/hicn-plugin/src/route.c index 0c96e1412..a2e72b9c1 100644 --- a/hicn-plugin/src/route.c +++ b/hicn-plugin/src/route.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Cisco and/or its affiliates. + * Copyright (c) 2021-2023 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -273,7 +273,7 @@ sync_hicn_fib_entry (hicn_dpo_ctx_t *fib_entry, hicn_face_id_t **pvec_faces) fib_entry->proto); ADD_FACE (nh); HICN_DEBUG ("Added new HICN face: %d because of route prefix %U", - face_id, format_ip_prefix, &_fib_entry->fe_prefix); + 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) @@ -405,11 +405,10 @@ hicn_route_enable (fib_prefix_t *prefix, hicn_face_id_t **pvec_faces) { HICN_DEBUG ( "No route found for %U. Creating DPO and tracking fib prefix.", - format_ip_prefix, prefix); + format_fib_prefix, prefix); dpo_id_t dpo = DPO_INVALID; - index_t dpo_idx; - default_dpo.hicn_dpo_create (prefix->fp_proto, 0, NEXT_HOP_INVALID, - &dpo_idx); + index_t dpo_idx = ~0; + default_dpo.hicn_dpo_create (prefix->fp_proto, 0, 0, &dpo_idx); HICN_DEBUG ("Created new DPO_MW_CTX_T: %d.", dpo_idx); /* the value we got when we registered */ @@ -534,8 +533,8 @@ hicn_route_disable (fib_prefix_t *prefix) if (fib_hicn_entry_index == FIB_NODE_INDEX_INVALID) { - HICN_ERROR ("Route %U not found", format_ip_prefix, prefix); - return HICN_ERROR_ROUTE_NOT_FOUND; + HICN_ERROR ("Route %U not found", format_fib_prefix, prefix); + ret = HICN_ERROR_ROUTE_NOT_FOUND; } else { @@ -605,7 +604,7 @@ hicn_route_disable (fib_prefix_t *prefix) HICN_DEBUG ( "Calling fib_entry_untrack and fib_table_entry_special_remove " "for route %U.", - format_ip_prefix, prefix); + format_fib_prefix, prefix); fib_entry_untrack (hicn_fib_entry->fib_entry_index, hicn_fib_entry->fib_sibling); |