diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2024-06-01 10:08:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-01 10:08:25 -0400 |
| commit | 894e72895ed272c9eceeb3c320b5edb292fed65b (patch) | |
| tree | 62c0ab6ef2877dc94a5b9663042439152e84a636 | |
| parent | 517bdaa31337fc5e20b3cee5316dceb9cdf02545 (diff) | |
| parent | 637ab53f75a9288888dfb48b8b939833fa3501ed (diff) | |
Merge pull request #16127 from opensourcerouting/fix/eor_not_only_for_gr
bgpd: Send End-of-RIB not only if Graceful Restart capability is received
| -rw-r--r-- | bgpd/bgp_packet.c | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 86f85dd866..3f38790cbd 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -560,40 +560,37 @@ void bgp_generate_updgrp_packets(struct event *thread) } } - if (CHECK_FLAG(peer->cap, - PEER_CAP_RESTART_RCV)) { - if (!(PAF_SUBGRP(paf))->t_coalesce - && peer->afc_nego[afi][safi] - && peer->synctime - && !CHECK_FLAG( - peer->af_sflags[afi][safi], - PEER_STATUS_EOR_SEND)) { - /* If EOR is disabled, - * the message is not sent - */ - if (BGP_SEND_EOR(peer->bgp, afi, - safi)) { - SET_FLAG( - peer->af_sflags - [afi] - [safi], - PEER_STATUS_EOR_SEND); - - /* Update EOR - * send time - */ - peer->eor_stime[afi] - [safi] = - monotime(NULL); - - BGP_UPDATE_EOR_PKT( - peer, afi, safi, - s); - bgp_process_pending_refresh( - peer, afi, - safi); - } - } + /* rfc4724 says: + * Although the End-of-RIB marker is + * specified for the purpose of BGP + * graceful restart, it is noted that + * the generation of such a marker upon + * completion of the initial update would + * be useful for routing convergence in + * general, and thus the practice is + * recommended. + */ + if (!(PAF_SUBGRP(paf))->t_coalesce && + peer->afc_nego[afi][safi] && + peer->synctime && + !CHECK_FLAG(peer->af_sflags[afi][safi], + PEER_STATUS_EOR_SEND)) { + /* If EOR is disabled, the message is + * not sent. + */ + if (!BGP_SEND_EOR(peer->bgp, afi, safi)) + continue; + + SET_FLAG(peer->af_sflags[afi][safi], + PEER_STATUS_EOR_SEND); + + /* Update EOR send time */ + peer->eor_stime[afi][safi] = + monotime(NULL); + + BGP_UPDATE_EOR_PKT(peer, afi, safi, s); + bgp_process_pending_refresh(peer, afi, + safi); } continue; } |
