]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: add bfd event trace
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 2 May 2019 07:35:29 +0000 (09:35 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 6 May 2019 11:50:47 +0000 (13:50 +0200)
that bfd event trace is visible when 'debug bgp neighbor-event' is
enabled.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_bfd.c

index dadf124eec195a2136ad3528b3530db5709af5ca..f1737ff9f07d31b778dd6bba9fe2758c5a702a9e 100644 (file)
@@ -276,6 +276,11 @@ static void bgp_bfd_peer_status_update(struct peer *peer, int status)
        bfd_info->status = status;
        bfd_info->last_update = bgp_clock();
 
+       if (status != old_status) {
+               if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS))
+                       zlog_debug("[%s]: BFD %s", peer->host,
+                                  bfd_get_status_str(status));
+       }
        if ((status == BFD_STATUS_DOWN) && (old_status == BFD_STATUS_UP)) {
                peer->last_reset = PEER_DOWN_BFD_DOWN;
                BGP_EVENT_ADD(peer, BGP_Stop);