Skip to content

Conversation

@donaldsharp
Copy link
Member

Currently there is a dest flag BGP_NODE_SOFT_RECONFIG that when set completely stops processing of the path, because it is assumed that when running through all of those adjacency in's that the node will be reprocessed.

Imagine this series of events:

a) route-map change that causes a soft-adjacency run to be triggered for the dest.
b) Schedule all dests associated with the adjacency in's to be processed in the future
c) Some other event that causes a need for processing of that node. This can be, but is not limited to:
1) NHT change and we need to reprocess the node
2) Receive a update for a dest that does not have soft
adjacency turned on( but some other path_info for the
node does.
d) Current best path processing sees that the node has a SOFT_RECONFIG flag on it, this stops processing.
e) The SOFT_RECONFIG task wakes up and re runs the filter mechanism and decides that the path is filtered. BGP then stops processing for that node and does nothing. f) We are left with a situation where the soft-reconfig has caused a update that should be processed from being processed.

Modify the code to not abort the best path run when the flag is set. Just let it happen. Yeah we are doing a bit more processing but the end state will be correct.

Currently there is a dest flag `BGP_NODE_SOFT_RECONFIG` that
when set completely stops processing of the path, because it
is assumed that when running through all of those adjacency
in's that the node will be reprocessed.

Imagine this series of events:

a) route-map change that causes a soft-adjacency run to be
triggered for the dest.
b) Schedule all dests associated with the adjacency in's
to be processed in the future
c) Some other event that causes a need for processing of that
node.  This can be, but is not limited to:
     1) NHT change and we need to reprocess the node
     2) Receive a update for a dest that does not have soft
        adjacency turned on( but some other path_info for the
        node does.
d) Current best path processing sees that the node has a
SOFT_RECONFIG flag on it, this stops processing.
e) The SOFT_RECONFIG task wakes up and re runs the filter
mechanism and decides that the path is filtered.  BGP
then stops processing for that node and does nothing.
f) We are left with a situation where the soft-reconfig
has caused a update that should be processed from being
processed.

Modify the code to not abort the best path run when the flag
is set.  Just let it happen.  Yeah we are doing a bit more
processing but the end state will be correct.

Signed-off-by: Donald Sharp <[email protected]>
@donaldsharp
Copy link
Member Author

This PR is a result of discussing a problem in the bgpd channel on slack. I do not know how to make this problem happen ( it's a tight timing issue ). Let's see if the finder of this bug has a recreate situation that they can test.

@donaldsharp
Copy link
Member Author

Reporter indicated that this fixed the issue

@ton31337 ton31337 merged commit 30e3047 into FRRouting:master Jun 24, 2025
16 checks passed
@donaldsharp donaldsharp deleted the bgp_force_bestpath branch July 30, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants