mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-28 16:06:20 +00:00
zebra: resolve assert when adding ip import-table entry
Problem was due to in certain route replace circumstances, we would mark the old route_entry as removed to delete it but would leave the selected flag set. When the rn was pulled off the work queue for process, we would find both the new re and old re (being deleted) with the selected flag set and would assert. In this change, when we decide to delete the old re, we also mark it as no longer selected. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
parent
bf2c7ef2a6
commit
e71c84ca31
@ -531,6 +531,7 @@ int zebra_add_import_table_entry(struct route_node *rn, struct route_entry *re,
|
||||
re->tag, rmap_name);
|
||||
|
||||
if (ret != RMAP_MATCH) {
|
||||
UNSET_FLAG(same->flags, ZEBRA_FLAG_SELECTED);
|
||||
zebra_del_import_table_entry(rn, re);
|
||||
return 0;
|
||||
}
|
||||
@ -547,8 +548,10 @@ int zebra_add_import_table_entry(struct route_node *rn, struct route_entry *re,
|
||||
break;
|
||||
}
|
||||
|
||||
if (same)
|
||||
if (same) {
|
||||
UNSET_FLAG(same->flags, ZEBRA_FLAG_SELECTED);
|
||||
zebra_del_import_table_entry(rn, same);
|
||||
}
|
||||
|
||||
newre = XCALLOC(MTYPE_RE, sizeof(struct route_entry));
|
||||
newre->type = ZEBRA_ROUTE_TABLE;
|
||||
|
Loading…
Reference in New Issue
Block a user