Skip to content

Commit

Permalink
bgpd: Set last reset No AFI/SAFI activated for peer after we do def…
Browse files Browse the repository at this point in the history
…aults

Move checking if the peer is active only after we apply defaults for address
families.

If the family got activated after applying the defaults we should reset last_reset
reason.

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Jan 18, 2025
1 parent a14f122 commit 0e961cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2026,8 +2026,10 @@ 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)) {
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);
Expand Down

0 comments on commit 0e961cc

Please sign in to comment.