mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 20:51:17 +00:00
bgpd: Stop LLGR timer when the connection is established
When the connection goes up, the timer is not stopped and if we have a subsequent GR event we have an old timer which is not as we expect. Before: ``` spine1-debian-11# sh ip bgp 192.168.100.1/32 BGP routing table entry for 192.168.100.1/32, version 95 Paths: (1 available, best #1, table default, mark routes to be retained for a longer time. Requires support for Long-lived BGP Graceful Restart) Not advertised to any peer 65001 47583, (stale) 192.168.0.1 from 192.168.0.1 (100.100.200.100) Origin incomplete, valid, external, best (First path received) Community: llgr-stale Last update: Mon Mar 28 08:27:53 2022 Time until Long-lived stale route deleted: 23 <<<<<<<<<<<< spine1-debian-11# sh ip bgp 192.168.100.1/32 BGP routing table entry for 192.168.100.1/32, version 103 Paths: (1 available, best #1, table default) Advertised to non peer-group peers: 192.168.0.1 65001 47583 192.168.0.1 from 192.168.0.1 (100.100.200.100) Origin incomplete, valid, external, best (First path received) Last update: Mon Mar 28 08:43:29 2022 spine1-debian-11# sh ip bgp 192.168.100.1/32 BGP routing table entry for 192.168.100.1/32, version 103 Paths: (1 available, best #1, table default, mark routes to be retained for a longer time. Requires support for Long-lived BGP Graceful Restart) Not advertised to any peer 65001 47583, (stale) 192.168.0.1 from 192.168.0.1 (100.100.200.100) Origin incomplete, valid, external, best (First path received) Community: llgr-stale Last update: Mon Mar 28 08:43:30 2022 Time until Long-lived stale route deleted: 17 <<<<<<<<<<<<<<< ``` After: ``` spine1-debian-11# sh ip bgp 192.168.100.1/32 BGP routing table entry for 192.168.100.1/32, version 79 Paths: (1 available, best #1, table default, mark routes to be retained for a longer time. Requires support for Long-lived BGP Graceful Restart) Not advertised to any peer 65001 47583, (stale) 192.168.0.1 from 192.168.0.1 (0.0.0.0) Origin incomplete, valid, external, best (First path received) Community: llgr-stale Last update: Mon Mar 28 09:05:18 2022 Time until Long-lived stale route deleted: 24 <<<<<<<<<<<<<<< spine1-debian-11# sh ip bgp 192.168.100.1/32 BGP routing table entry for 192.168.100.1/32, version 87 Paths: (1 available, best #1, table default) Advertised to non peer-group peers: 192.168.0.1 65001 47583 192.168.0.1 from 192.168.0.1 (100.100.200.100) Origin incomplete, valid, external, best (First path received) Last update: Mon Mar 28 09:05:25 2022 spine1-debian-11# sh ip bgp 192.168.100.1/32 BGP routing table entry for 192.168.100.1/32, version 87 Paths: (1 available, best #1, table default, mark routes to be retained for a longer time. Requires support for Long-lived BGP Graceful Restart) Not advertised to any peer 65001 47583, (stale) 192.168.0.1 from 192.168.0.1 (100.100.200.100) Origin incomplete, valid, external, best (First path received) Community: llgr-stale Last update: Mon Mar 28 09:05:29 2022 Time until Long-lived stale route deleted: 29 <<<<<<<<<<<<<< ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
f0a7100770
commit
0d4532cd82
@ -2200,8 +2200,18 @@ static int bgp_establish(struct peer *peer)
|
||||
|
||||
peer->uptime = bgp_clock();
|
||||
|
||||
/* Send route-refresh when ORF is enabled */
|
||||
/* Send route-refresh when ORF is enabled.
|
||||
* Stop Long-lived Graceful Restart timers.
|
||||
*/
|
||||
FOREACH_AFI_SAFI (afi, safi) {
|
||||
if (peer->t_llgr_stale[afi][safi]) {
|
||||
BGP_TIMER_OFF(peer->t_llgr_stale[afi][safi]);
|
||||
if (bgp_debug_neighbor_events(peer))
|
||||
zlog_debug(
|
||||
"%s Long-lived stale timer stopped for afi/safi: %d/%d",
|
||||
peer->host, afi, safi);
|
||||
}
|
||||
|
||||
if (CHECK_FLAG(peer->af_cap[afi][safi],
|
||||
PEER_CAP_ORF_PREFIX_SM_ADV)) {
|
||||
if (CHECK_FLAG(peer->af_cap[afi][safi],
|
||||
|
Loading…
Reference in New Issue
Block a user