From 8e2b1b129815d3e631aa425ed37899c78ea24e65 Mon Sep 17 00:00:00 2001 From: Paul Atkins Date: Tue, 12 Oct 2021 14:32:11 +0100 Subject: 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 Change-Id: I256375ba2fa863a62a88474ce1ea6bf2accdd456 --- src/plugins/igmp/igmp.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/plugins/igmp/igmp.c') diff --git a/src/plugins/igmp/igmp.c b/src/plugins/igmp/igmp.c index 1c686e39cf2..d66a013e3f9 100644 --- a/src/plugins/igmp/igmp.c +++ b/src/plugins/igmp/igmp.c @@ -408,18 +408,19 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode) { /* first config in this FIB */ mfib_table_lock (mfib_index, FIB_PROTOCOL_IP4, MFIB_SOURCE_IGMP); - mfib_table_entry_path_update (mfib_index, - &mpfx_general_query, - MFIB_SOURCE_IGMP, &for_us_path); - mfib_table_entry_path_update (mfib_index, - &mpfx_report, - MFIB_SOURCE_IGMP, &for_us_path); + mfib_table_entry_path_update (mfib_index, &mpfx_general_query, + MFIB_SOURCE_IGMP, + MFIB_ENTRY_FLAG_NONE, &for_us_path); + mfib_table_entry_path_update (mfib_index, &mpfx_report, + MFIB_SOURCE_IGMP, + MFIB_ENTRY_FLAG_NONE, &for_us_path); } - mfib_table_entry_path_update (mfib_index, - &mpfx_general_query, - MFIB_SOURCE_IGMP, &via_itf_path); + mfib_table_entry_path_update (mfib_index, &mpfx_general_query, + MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, + &via_itf_path); mfib_table_entry_path_update (mfib_index, &mpfx_report, - MFIB_SOURCE_IGMP, &via_itf_path); + MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, + &via_itf_path); } } else if (config && !enable) -- cgit 1.2.3-korg