]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Give more data when state machine fails to change state
authorDonald Sharp <sharpd@nvidia.com>
Fri, 2 Jun 2023 15:02:54 +0000 (11:02 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 2 Jun 2023 15:02:54 +0000 (11:02 -0400)
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 <sharpd@nvidia.com>
bgpd/bgp_fsm.c

index a289d3d67a0f6f605e49f3889ccfac4ad5b175d8..ad6906d092e99252fc1e0877edb54c12768a956b 100644 (file)
@@ -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);