Skip to content

Fix bestpath reason being incorrectly set in some cases #18819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2025

Conversation

donaldsharp
Copy link
Member

The best path reason was being incorrectly set in some cases. Let's fix that. Also write a test to show that it is fixed.

This configuration:

|----------------------     R3          -------- 192.168.199.0/24
|    192.16.3.0/24       RID 1.1.1.3
|                        AS 65003
|                        MED 150
|
|
|    192.16.2.0/24
R1 --------------------    R2          -------- 192.168.199.0/24
AS 65001                 RID 1.1.1.2
|                        AS 65024
|                        MED 200
|
|
|----------------------     R4          -------- 192.168.199.0/24
    192.16.4.0/24        RID 1.1.1.4
                         AS 65024
                         MED 100

Where you bring up r2, then r3 and the r4 the bestpath reason
selected would be Router-id and instead it should be MED.

Fix the bgp_route code to correctly have the correct bestpath
reason.

Fixes: FRRouting#16914
Signed-off-by: Donald Sharp <[email protected]>
Implement a topotest that shows a situation where
the bestpath was being incorrectly applied.
This test will be used to help show that bestpath
is correct.

Signed-off-by: Donald Sharp <[email protected]>
@frrbot frrbot bot added bgp bugfix tests Topotests, make check, etc labels May 15, 2025
@ton31337
Copy link
Member

@Mergifyio backport stable/10.3 stable/10.2 stable/10.1 stable/10.0

Copy link

mergify bot commented May 15, 2025

backport stable/10.3 stable/10.2 stable/10.1 stable/10.0

✅ Backports have been created

@ton31337 ton31337 merged commit 0546211 into FRRouting:master May 16, 2025
20 checks passed
donaldsharp added a commit that referenced this pull request May 16, 2025
Fix bestpath reason being incorrectly set in some cases (backport #18819)
donaldsharp added a commit that referenced this pull request May 16, 2025
Fix bestpath reason being incorrectly set in some cases (backport #18819)
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