From 731a7efa3fa58d0fee89c93d613e11d8b4108c89 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Tue, 21 Jan 2020 18:04:48 +0100 Subject: [HICN-485] Fixed entry deletion when the last nh is removed Change-Id: I1a3353989f934f135b4226a6af68a09dd8749563 Signed-off-by: Alberto Compagno --- hicn-plugin/src/strategies/dpo_mw.c | 8 +------- hicn-plugin/src/strategies/dpo_rr.c | 6 ------ 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'hicn-plugin/src/strategies') diff --git a/hicn-plugin/src/strategies/dpo_mw.c b/hicn-plugin/src/strategies/dpo_mw.c index dfdde3681..3317d31e0 100644 --- a/hicn-plugin/src/strategies/dpo_mw.c +++ b/hicn-plugin/src/strategies/dpo_mw.c @@ -258,7 +258,7 @@ hicn_strategy_mw_ctx_del_nh (hicn_face_id_t face_id, index_t dpo_idx, int ret = HICN_ERROR_DPO_CTX_NOT_FOUND; dpo_id_t invalid = NEXT_HOP_INVALID; - if (hicn_strategy_mw_ctx != NULL) + if (hicn_strategy_mw_ctx == NULL) return HICN_ERROR_STRATEGY_NOT_FOUND; for (int i = 0; i < hicn_strategy_mw_ctx->default_ctx.entry_count; i++) @@ -276,12 +276,6 @@ hicn_strategy_mw_ctx_del_nh (hicn_face_id_t face_id, index_t dpo_idx, } } - if (0 == hicn_strategy_mw_ctx->default_ctx.entry_count) - { - fib_table_entry_special_remove (HICN_FIB_TABLE, fib_pfx, - FIB_SOURCE_PLUGIN_HI); - } - return ret; } diff --git a/hicn-plugin/src/strategies/dpo_rr.c b/hicn-plugin/src/strategies/dpo_rr.c index 4cddd513c..dfdc83ff4 100644 --- a/hicn-plugin/src/strategies/dpo_rr.c +++ b/hicn-plugin/src/strategies/dpo_rr.c @@ -279,12 +279,6 @@ hicn_strategy_rr_ctx_del_nh (hicn_face_id_t face_id, index_t dpo_idx, } } - if (0 == hicn_strategy_rr_ctx->default_ctx.entry_count) - { - fib_table_entry_special_remove (HICN_FIB_TABLE, fib_pfx, - FIB_SOURCE_PLUGIN_HI); - } - return ret; } -- cgit 1.2.3-korg