summaryrefslogtreecommitdiffstats
path: root/src/vnet/mfib/mfib_table.c
diff options
context:
space:
mode:
authorPaul Atkins <patkins@graphiant.com>2021-10-12 14:32:11 +0100
committerNeale Ranns <neale@graphiant.com>2021-10-21 16:40:11 +0000
commit8e2b1b129815d3e631aa425ed37899c78ea24e65 (patch)
tree4df9608750ec288c2b0723467ff68528e62e8e9b /src/vnet/mfib/mfib_table.c
parentbfa86084af0e4d0cc8ad8ccbeafe999b748a990e (diff)
fib: respect mfib entry flags on create with paths
When an mfib entry was created with both paths and entry_flags then the entry flags were being ignored. If there are no paths then the flags were passed into mfib_table_entry_update, but in the case where the entry didn't exist and there were paths and flags, the entry was created within mfib_table_entry_paths_update() which used a default of MFIB_ENTRY_FLAG_NONE. Pass the flags through into the mfib_table_entry_paths_update fn. All existing callers other than the create case will now pass in MFIB_ENTRY_FLAG_NONE. Type: fix Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: I256375ba2fa863a62a88474ce1ea6bf2accdd456
Diffstat (limited to 'src/vnet/mfib/mfib_table.c')
-rw-r--r--src/vnet/mfib/mfib_table.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/mfib/mfib_table.c b/src/vnet/mfib/mfib_table.c
index a6a82774794..bbb9b05674a 100644
--- a/src/vnet/mfib/mfib_table.c
+++ b/src/vnet/mfib/mfib_table.c
@@ -292,6 +292,7 @@ static fib_node_index_t
mfib_table_entry_paths_update_i (u32 fib_index,
const mfib_prefix_t *prefix,
mfib_source_t source,
+ mfib_entry_flags_t entry_flags,
const fib_route_path_t *rpaths)
{
fib_node_index_t mfib_entry_index;
@@ -306,7 +307,7 @@ mfib_table_entry_paths_update_i (u32 fib_index,
source,
prefix,
MFIB_RPF_ID_NONE,
- MFIB_ENTRY_FLAG_NONE,
+ entry_flags,
INDEX_INVALID);
mfib_entry_path_update(mfib_entry_index, source, rpaths);
@@ -325,6 +326,7 @@ fib_node_index_t
mfib_table_entry_path_update (u32 fib_index,
const mfib_prefix_t *prefix,
mfib_source_t source,
+ mfib_entry_flags_t entry_flags,
const fib_route_path_t *rpath)
{
fib_node_index_t mfib_entry_index;
@@ -333,7 +335,8 @@ mfib_table_entry_path_update (u32 fib_index,
vec_add1(rpaths, *rpath);
mfib_entry_index = mfib_table_entry_paths_update_i(fib_index, prefix,
- source, rpaths);
+ source, entry_flags,
+ rpaths);
vec_free(rpaths);
return (mfib_entry_index);
@@ -343,10 +346,11 @@ fib_node_index_t
mfib_table_entry_paths_update (u32 fib_index,
const mfib_prefix_t *prefix,
mfib_source_t source,
+ mfib_entry_flags_t entry_flags,
const fib_route_path_t *rpaths)
{
return (mfib_table_entry_paths_update_i(fib_index, prefix,
- source, rpaths));
+ source, entry_flags, rpaths));
}
static void