Skip to content

bgpd: fix the local-preference setting for EBGP-OAD - #20898

Merged
riw777 merged 1 commit into
FRRouting:masterfrom
enkechen-panw:bgp-oad-fix
Feb 24, 2026
Merged

bgpd: fix the local-preference setting for EBGP-OAD#20898
riw777 merged 1 commit into
FRRouting:masterfrom
enkechen-panw:bgp-oad-fix

Conversation

@enkechen-panw

Copy link
Copy Markdown
Contributor

Make sure the local-preference is set for EBGP-OAD.

Make sure the local-preference is set for EBGP-OAD.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
@greptile-apps

greptile-apps Bot commented Feb 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds BGP_PEER_EBGP_OAD to the condition that determines when to set the local-preference attribute, treating EBGP-OAD peers similarly to IBGP and CONFED peers.

  • EBGP-OAD (External BGP - Optimal Administrative Distance) peers represent a special peering type defined in draft-uttaro-idr-bgp-oad
  • The change ensures that routes advertised to EBGP-OAD peers have the local-preference attribute set when it's not already present
  • This is consistent with existing code patterns where EBGP-OAD peers are treated more like internal peers than external peers (see lines 2000, 2005, 2696, 3084-3085 in the same file)
  • The fix aligns with path selection logic (lines 1486, 1501) where EBGP-OAD is grouped with IBGP/CONFED peers

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a simple, focused fix that adds EBGP-OAD to an existing condition. It's consistent with multiple other locations in the codebase where EBGP-OAD peers are treated like IBGP/CONFED peers rather than standard EBGP peers. The pattern matches the established architecture for handling this peer type.
  • No files require special attention

Important Files Changed

Filename Overview
bgpd/bgp_route.c Added BGP_PEER_EBGP_OAD to the condition for setting local-preference, treating EBGP-OAD peers like IBGP/CONFED peers

Last reviewed commit: 7f73de9

@riw777 riw777 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@riw777
riw777 merged commit 765a43c into FRRouting:master Feb 24, 2026
25 checks passed
@enkechen-panw
enkechen-panw deleted the bgp-oad-fix branch February 24, 2026 16:56
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