From 907234817c09efc1b4f2f63a68dddcbc3db5dbf9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 2 Jun 2023 11:02:54 -0400 Subject: [PATCH] bgpd: Give more data when state machine fails to change state When a state machine transition fails, bgpd would output data about what happened, but not necessarily give the reason why. Add that data to the output. Signed-off-by: Donald Sharp --- bgpd/bgp_fsm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index a289d3d67a..ad6906d092 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -2656,12 +2656,12 @@ int bgp_event_update(struct peer *peer, enum bgp_fsm_events event) ret != BGP_FSM_FAILURE_AND_DELETE) { flog_err( EC_BGP_FSM, - "%s [FSM] Failure handling event %s in state %s, prior events %s, %s, fd %d", + "%s [FSM] Failure handling event %s in state %s, prior events %s, %s, fd %d, last reset: %s", peer->host, bgp_event_str[peer->cur_event], lookup_msg(bgp_status_msg, peer->status, NULL), bgp_event_str[peer->last_event], - bgp_event_str[peer->last_major_event], - peer->fd); + bgp_event_str[peer->last_major_event], peer->fd, + peer_down_str[peer->last_reset]); bgp_stop(peer); bgp_fsm_change_status(peer, Idle); bgp_timer_set(peer);