aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/strategies/strategy_mw_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/strategies/strategy_mw_cli.c')
-rw-r--r--hicn-plugin/src/strategies/strategy_mw_cli.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/hicn-plugin/src/strategies/strategy_mw_cli.c b/hicn-plugin/src/strategies/strategy_mw_cli.c
index 50d4d21f0..701f96fa7 100644
--- a/hicn-plugin/src/strategies/strategy_mw_cli.c
+++ b/hicn-plugin/src/strategies/strategy_mw_cli.c
@@ -38,8 +38,6 @@ hicn_mw_strategy_cli_set_weight_command_fn (vlib_main_t * vm,
u32 weight = HICN_PARAM_FIB_ENTRY_NHOP_WGHT_DFLT;
hicn_dpo_ctx_t *hicn_dpo_ctx;
const dpo_id_t *hicn_dpo_id;
- u32 vft_id;
- const hicn_dpo_vft_t *dpo_vft;
/* Get a line of input. */
unformat_input_t _line_input, *line_input = &_line_input;
@@ -79,14 +77,14 @@ hicn_mw_strategy_cli_set_weight_command_fn (vlib_main_t * vm,
goto done;
}
- prefix.fp_proto = ip46_address_is_ip4(&prefix.fp_addr) ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
+ prefix.fp_proto =
+ ip46_address_is_ip4 (&prefix.
+ fp_addr) ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
ret = hicn_route_get_dpo (&prefix, &hicn_dpo_id, &fib_index);
if (ret == HICN_ERROR_NONE)
{
- vft_id = hicn_dpo_get_vft_id (hicn_dpo_id);
- dpo_vft = hicn_dpo_get_vft (vft_id);
- hicn_dpo_ctx = dpo_vft->hicn_dpo_get_ctx (hicn_dpo_id->dpoi_index);
+ hicn_dpo_ctx = hicn_strategy_dpo_ctx_get (hicn_dpo_id->dpoi_index);
if (hicn_dpo_ctx == NULL
|| hicn_dpo_id->dpoi_type != hicn_dpo_strategy_mw_get_type ())