diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-01-18 14:54:20 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-01-19 11:08:00 +0200 |
| commit | 9a5be111916cecf6b4c9c680c52634271c4bf9cc (patch) | |
| tree | 4eab64ff9fbde3d68c9103a6851ac949b3ad3e58 /bgpd | |
| parent | 0702ddb3c94e2f7cf2b0d0ef7886d8e21bf61bed (diff) | |
bgpd: Set last reset `No AFI/SAFI activated for peer` after we do defaults
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 <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgpd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index c2254ae791..db74dd68d0 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -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); |
