From 55d06ad1cd4f64fc7382bcaf14dc57c1f16db8fe Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Mon, 12 Dec 2022 16:19:35 +0000 Subject: feat: upgrade to VPP 22.10 Change-Id: I556bd8c44f0ff7a631a0df34b498ffd7952fcf4a Signed-off-by: Mauro Sardara --- hicn-plugin/src/strategy_dpo_ctx.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hicn-plugin/src/strategy_dpo_ctx.h') 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; } -- cgit 1.2.3-korg