Merge pull request #17881 from opensourcerouting/fix/last_reset_reason

bgpd: last reset SNAFU
This commit is contained in:
Russ White 2025-01-28 10:40:50 -05:00 committed by GitHub
commit cec2e9b159
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -2163,6 +2163,9 @@ bgp_establish(struct peer_connection *connection)
peer->established++;
bgp_fsm_change_status(connection, Established);
if (peer->last_reset == PEER_DOWN_WAITING_OPEN)
peer->last_reset = 0;
/* bgp log-neighbor-changes of neighbor Up */
if (CHECK_FLAG(peer->bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) {
struct vrf *vrf = vrf_lookup_by_id(peer->bgp->vrf_id);

View File

@ -2026,8 +2026,11 @@ struct peer *peer_create(union sockunion *su, const char *conf_if,
if (bgp->autoshutdown)
peer_flag_set(peer, PEER_FLAG_SHUTDOWN);
/* Set up peer's events and timers. */
else if (!active && peer_active(peer->connection))
else if (!active && peer_active(peer->connection)) {
if (peer->last_reset == PEER_DOWN_NOAFI_ACTIVATED)
peer->last_reset = 0;
bgp_timer_set(peer->connection);
}
bgp_peer_gr_flags_update(peer);
BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(bgp, bgp->peer);