bgpd: Do not show "Waiting for OPEN" as last reset

This is actually not reset, and should be ignored showing it as last reset
under `show bgp neighbor`.

Fixes: 1e91f1d119 ("bgpd: Update failed reason to distinguish some NHT scenario")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2025-01-18 14:16:06 +02:00
parent 3c3b559706
commit 0702ddb3c9

View File

@ -2163,6 +2163,9 @@ bgp_establish(struct peer_connection *connection)
peer->established++; peer->established++;
bgp_fsm_change_status(connection, 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 */ /* bgp log-neighbor-changes of neighbor Up */
if (CHECK_FLAG(peer->bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) { if (CHECK_FLAG(peer->bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) {
struct vrf *vrf = vrf_lookup_by_id(peer->bgp->vrf_id); struct vrf *vrf = vrf_lookup_by_id(peer->bgp->vrf_id);