diff options
author | Maxime Peim <mpeim@cisco.com> | 2024-02-20 12:27:38 +0100 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2024-07-12 03:12:58 +0000 |
commit | 6eac5bac60253b2149bed6da9bf29558e19722d0 (patch) | |
tree | c6ef14727dcc2be69f7888b47aacbf2c19a184de /src/vnet | |
parent | 0e3fcc0b7ef70b82145730749c3c2b648d6732c4 (diff) |
fib: fix covered_inherit_add
When a FIB entry has multiple sources installed by covering inheritance,
the first walk installs the covering source, which can be worse than the
already used one (hence the source is not activated). If a covering path
is added and a new fib cover walk is done, the deactivated source is
compared to itself. This operation calls for a reactivation of the source which was not activated in the first place.
Type: fix
Change-Id: I2639401bed14eb5a2cb003664c04d6c1f9130de9
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/fib/fib_entry_src.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c index 8ddb967a328..d9cf82343c5 100644 --- a/src/vnet/fib/fib_entry_src.c +++ b/src/vnet/fib/fib_entry_src.c @@ -875,8 +875,12 @@ fib_entry_src_covered_inherit_add_i (fib_entry_t *fib_entry, * The covered's source data has been inherited, presumably * from this cover, i.e. this is a modify. */ - esrc = fib_entry_src_action_update_from_cover(fib_entry, cover_src); - fib_entry_source_change(fib_entry, esrc->fes_src, esrc->fes_src); + fib_source_t best_source; + + best_source = fib_entry_get_best_source( + fib_entry_get_index(fib_entry)); + fib_entry_src_action_update_from_cover(fib_entry, cover_src); + fib_entry_source_change(fib_entry, best_source, cover_src->fes_src); } else { |