diff options
author | Chirag Shah <chirag@nvidia.com> | 2021-01-25 20:44:56 +0100 |
---|---|---|
committer | Chirag Shah <chirag@nvidia.com> | 2021-03-02 01:04:31 +0100 |
commit | f7f101156eb0e225f375f12cf4f863ebbe3fed03 (patch) | |
tree | 2a5757e5cd0df03ee710018bbbe74e4287bd6af9 /lib | |
parent | lib: fix plist le ge reset value (diff) | |
download | frr-f7f101156eb0e225f375f12cf4f863ebbe3fed03.tar.xz frr-f7f101156eb0e225f375f12cf4f863ebbe3fed03.zip |
lib: fix a crash in plist update
Problem:
Prefix-list with mulitiple rules, an update to
a rule/sequence with different prefix/prefixlen
reset prefix-list next-base pointer to avoid
having stale value.
In some case the old next-bast's reference leads
to an assert in tri (trie_install_fn ) add.
bt:
(object=0x55576a4c8a00, updptr=0x55576a4b97e0) at lib/plist.c:560
(plist=0x55576a4a1770, pentry=0x55576a4c8a00) at lib/plist.c:585
(ple=0x55576a4c8a00) at lib/plist.c:745
(args=0x7fffe04beb50) at lib/filter_nb.c:1181
Solution:
Reset prefix-list next-base pointer whenver a
sequence/rule is updated.
Ticket:CM-33109
Testing Done:
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plist.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/plist.c b/lib/plist.c index 4588dfe1d..fe4689bec 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -684,6 +684,7 @@ void prefix_list_entry_update_start(struct prefix_list_entry *ple) if (pl->head || pl->tail || pl->desc) pl->master->recent = pl; + ple->next_best = NULL; ple->installed = false; } |