aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/ip4_fib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/fib/ip4_fib.c')
-rw-r--r--src/vnet/fib/ip4_fib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c
index 01f4a755ec2..d8d983dd9c1 100644
--- a/src/vnet/fib/ip4_fib.c
+++ b/src/vnet/fib/ip4_fib.c
@@ -391,9 +391,7 @@ ip4_fib_table_fwding_dpo_remove (ip4_fib_t *fib,
const dpo_id_t *dpo,
u32 cover_index)
{
- fib_prefix_t cover_prefix = {
- .fp_len = 0,
- };
+ const fib_prefix_t *cover_prefix;
const dpo_id_t *cover_dpo;
/*
@@ -401,12 +399,12 @@ ip4_fib_table_fwding_dpo_remove (ip4_fib_t *fib,
* covering prefix, so it can fill the plys with the correct replacement
* for the entry being removed
*/
- fib_entry_get_prefix(cover_index, &cover_prefix);
+ cover_prefix = fib_entry_get_prefix(cover_index);
cover_dpo = fib_entry_contribute_ip_forwarding(cover_index);
ip4_fib_mtrie_route_del(&fib->mtrie,
addr, len, dpo->dpoi_index,
- cover_prefix.fp_len,
+ cover_prefix->fp_len,
cover_dpo->dpoi_index);
}