Skip to content
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

bgpd: Fix GR when using R-bit with hard reset (adminstrative reset) #18241

Closed

Conversation

ton31337
Copy link
Member

Closes #18238

@Pdoijode
Copy link
Contributor

Pdoijode commented Feb 24, 2025

@ton31337 with this code change, on the receiving peer even when F-bit is set in GR capability, it will end up deleting the stale routes, which is wrong!

To me, it looks like the F-bit was not set by the restarting node on session re-establishment. We may have to enable logs and check if that's the case and if it's indeed the case, then we'd have to debug why the restarting node didn't send F-bit if forwarding was indeed preserved.

Here's what the RFC says:

https://datatracker.ietf.org/doc/html/rfc4724#section-4.2 (Graceful Restart Mechanism for BGP):

   Once the session is re-established, if the "Forwarding State" bit for
   a specific address family is not set in the newly received Graceful
   Restart Capability, or if a specific address family is not included
   in the newly received Graceful Restart Capability, or if the Graceful
   Restart Capability is not received in the re-established session at
   all, then the Receiving Speaker MUST immediately remove all the stale
   routes from the peer that it is retaining for that address family.

https://datatracker.ietf.org/doc/html/rfc8538#section-4 (Notification Message Support for BGP Graceful Restart):

Once the session is re-established, both BGP speakers SHOULD set
   their Forwarding State bit to 1.  If the Forwarding State bit is not
   set, then, according to the procedures in [Section 4.2 of [RFC4724]](https://datatracker.ietf.org/doc/html/rfc4724#section-4.2),
   the relevant routes will be flushed, defeating the goals of this
   specification.

@ton31337 ton31337 marked this pull request as draft February 25, 2025 12:24
@ton31337 ton31337 force-pushed the fix/bgp_gr_preserve branch from d8c36b2 to 68771a9 Compare February 25, 2025 13:28
@ton31337 ton31337 closed this Feb 25, 2025
@ton31337 ton31337 deleted the fix/bgp_gr_preserve branch February 25, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bgp master size/M tests Topotests, make check, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graceful Restart procedures do not apply when hard-administrative-reset flag is disabled
3 participants