forked from Mirror/frr
bgpd: Fix for BGP core when connected routes are redistributed
& GR is enabled. When GR with deferral is enabled and connected routes are distributed then in one race condition route node gets added in to both deferred queue and work queue. If deferred queue gets processed first then it ends up delete only flag while leaving the entry in the work queue as it is. When a new update comes for the same route node next time from peer then it hits assert. Assert check is added to ensure we don’t add to work queue again while it is already present. So, check before adding in to deferred queue if it is already present in work queue and bail if so. Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
This commit is contained in:
parent
5cce3f0544
commit
5f9c1aa29e
|
@ -314,6 +314,15 @@ static int bgp_node_set_defer_flag(struct bgp_node *rn, bool delete)
|
|||
if (CHECK_FLAG(rn->flags, BGP_NODE_SELECT_DEFER) && (delete == false))
|
||||
return 0;
|
||||
|
||||
if (CHECK_FLAG(rn->flags, BGP_NODE_PROCESS_SCHEDULED)) {
|
||||
if (BGP_DEBUG(update, UPDATE_OUT)) {
|
||||
prefix2str(&rn->p, buf, PREFIX2STR_BUFFER);
|
||||
zlog_debug("Route %s is in workqueue and being processed, not deferred.",
|
||||
buf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
table = bgp_node_table(rn);
|
||||
if (table) {
|
||||
bgp = table->bgp;
|
||||
|
|
Loading…
Reference in a new issue