bgp: avoid false cluster loops on plain iBGP sessions #626
All Vouch review confidence checks passed
Residual risk 0.10 = Change Risk (0.44) × (1 − Review Confidence (0.77)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 328 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.55 · 3 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.347
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
5 items
We don't use a separate tests/ directory in this repo yet. Could you move these tests into the mod tests in mod.rs, next to the other RFC 4456 loop detection tests
Changes Requested
Two comments on the commit message:
The PR description says GoBGP made a similar fix. But GoBGP 544c4bea adds a CLUSTER_LIST check on import that GoBGP did not have before, so it fixes a missing check. This PR changes the definition of the local CLUSTER_ID instead, and the RFC is not clear about that definition. If you want to mention GoBGP, please say that this PR makes the behavior the same as GoBGP 544c4bea.
Updated commit message and tests. Thank you for review!
Thanks!
fujita
nuclearcat
Reproduced with an iBGP session without RR clients: an UPDATE whose CLUSTER_LIST contains the local router ID is incorrectly rejected. The session treated its router ID as a cluster ID even without local route reflection.
Build and check only effective local RR cluster IDs, consistent with RFC 4456, while preserving loop checks for client and non-client peers. Add active/passive wire and configuration regression tests using synthetic addresses and a private ASN.
Similar fix i noticed comitted last week in GoBGP: https://github.com/osrg/gobgp/commit/544c4beae3bd6f01f869a2b7037e4953560d34a0
Did you use an AI tool?
Assisted-by: OpenAI Codex