]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Update an fsm debug message
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 28 May 2019 22:08:28 +0000 (18:08 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 28 May 2019 22:10:26 +0000 (18:10 -0400)
When debugging I was having a hard time correlating some data and noticed that
a particular debug was not being very useful.

Signed-off-by: Donald Sharp <sharpd@cumulusnstworks.com>
bgpd/bgp_fsm.c

index 12ae1f841a511d20bb28434388f728662d51cdea..dd765731dcabc02f158327c1836ae6b2ac466031 100644 (file)
@@ -949,9 +949,15 @@ void bgp_fsm_change_status(struct peer *peer, int status)
        else if ((peer->status == Established) && (status != Established))
                bgp->established_peers--;
 
-       if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS))
-               zlog_debug("%s : vrf %u, established_peers %u", __func__,
-                               bgp->vrf_id, bgp->established_peers);
+       if (bgp_debug_neighbor_events(peer)) {
+               struct vrf *vrf = vrf_lookup_by_id(bgp->vrf_id);
+
+               zlog_debug("%s : vrf %s(%u), Status: %s established_peers %u", __func__,
+                          vrf ? vrf->name : "Unknown", bgp->vrf_id,
+                          lookup_msg(bgp_status_msg, status, NULL),
+                          bgp->established_peers);
+       }
+
        /* Set to router ID to the value provided by RIB if there are no peers
         * in the established state and peer count did not change
         */