Merge pull request #8718 from taspelund/fix_pfx-tree_default

lib: fix handling of rmap prefix-tree default node
This commit is contained in:
Rafael Zalamena 2021-05-25 12:31:03 -03:00 committed by GitHub
commit 72b9e0cf84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1982,7 +1982,15 @@ static void route_map_add_plist_entries(afi_t afi,
return;
}
route_map_pfx_table_del_default(afi, index);
/* Default entry should be deleted only if the first entry of the
* prefix-list is created.
*/
if (entry) {
if (plist->count == 1)
route_map_pfx_table_del_default(afi, index);
} else {
route_map_pfx_table_del_default(afi, index);
}
if (entry) {
if (afi == AFI_IP) {