aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/strategy_dpo_ctx.h
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-12-12 16:19:35 +0000
committerMauro Sardara <msardara@cisco.com>2023-01-10 16:09:24 +0000
commit55d06ad1cd4f64fc7382bcaf14dc57c1f16db8fe (patch)
treecb2c361050e90a27d32ffcbc93e27b57c45ae583 /hicn-plugin/src/strategy_dpo_ctx.h
parenta5f7941f49160021506ecae0da090f0b204b75ea (diff)
feat: upgrade to VPP 22.10v22.10-rc0
Change-Id: I556bd8c44f0ff7a631a0df34b498ffd7952fcf4a Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-plugin/src/strategy_dpo_ctx.h')
-rw-r--r--hicn-plugin/src/strategy_dpo_ctx.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/hicn-plugin/src/strategy_dpo_ctx.h b/hicn-plugin/src/strategy_dpo_ctx.h
index cb8ca4051..ae642a350 100644
--- a/hicn-plugin/src/strategy_dpo_ctx.h
+++ b/hicn-plugin/src/strategy_dpo_ctx.h
@@ -99,6 +99,7 @@ init_dpo_ctx (hicn_dpo_ctx_t *dpo_ctx, const hicn_face_id_t *next_hop,
int nh_len, dpo_type_t dpo_type, dpo_proto_t proto)
{
hicn_face_id_t invalid = NEXT_HOP_INVALID;
+ int i = 0;
dpo_ctx->entry_count = 0;
dpo_ctx->locks = 0;
@@ -110,13 +111,13 @@ init_dpo_ctx (hicn_dpo_ctx_t *dpo_ctx, const hicn_face_id_t *next_hop,
dpo_ctx->proto = (fib_protocol_t) proto;
- for (int i = 0; i < HICN_PARAM_FIB_ENTRY_NHOPS_MAX && i < nh_len; i++)
+ for (i = 0; i < HICN_PARAM_FIB_ENTRY_NHOPS_MAX && i < nh_len; i++)
{
dpo_ctx->next_hops[i] = next_hop[i];
dpo_ctx->entry_count++;
}
- for (int i = nh_len; i < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; i++)
+ for (; i < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; i++)
{
dpo_ctx->next_hops[i] = invalid;
}