diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-08-18 17:35:28 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-11-24 11:54:07 +0100 |
commit | 8ba709dd1cf0db3ca8bba2d656c765a54c815506 (patch) | |
tree | 7baf1fb9da66e295bbaf8a4de41237c50bbebd98 /bfdd | |
parent | bfdd: import distributed BFD implementation (diff) | |
download | frr-8ba709dd1cf0db3ca8bba2d656c765a54c815506.tar.xz frr-8ba709dd1cf0db3ca8bba2d656c765a54c815506.zip |
bfdd: distributed BFD debugging knob
Add a knob to show/hide the distributed BFD (data plane) debug messages.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfdd_vty.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index 837a7b7d7..7a00d0a02 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -749,6 +749,18 @@ DEFPY(bfd_show_peers_brief, bfd_show_peers_brief_cmd, } DEFPY( + bfd_debug_distributed, bfd_debug_distributed_cmd, + "[no] debug bfd distributed", + NO_STR + DEBUG_STR + "Bidirection Forwarding Detection\n" + "BFD data plane (distributed BFD) debugging\n") +{ + bglobal.debug_dplane = !no; + return CMD_SUCCESS; +} + +DEFPY( bfd_debug_peer, bfd_debug_peer_cmd, "[no] debug bfd peer", NO_STR @@ -888,6 +900,8 @@ DEFUN_NOSH(show_debugging_bfd, "BFD daemon\n") { vty_out(vty, "BFD debugging status:\n"); + if (bglobal.debug_dplane) + vty_out(vty, " Distributed BFD debugging is on.\n"); if (bglobal.debug_peer_event) vty_out(vty, " Peer events debugging is on.\n"); if (bglobal.debug_zebra) @@ -919,6 +933,11 @@ static int bfdd_write_config(struct vty *vty) struct lyd_node *dnode; int written = 0; + if (bglobal.debug_dplane) { + vty_out(vty, "debug bfd distributed\n"); + written = 1; + } + if (bglobal.debug_peer_event) { vty_out(vty, "debug bfd peer\n"); written = 1; @@ -953,10 +972,12 @@ void bfdd_vty_init(void) install_element(ENABLE_NODE, &bfd_show_peers_brief_cmd); install_element(ENABLE_NODE, &show_debugging_bfd_cmd); + install_element(ENABLE_NODE, &bfd_debug_distributed_cmd); install_element(ENABLE_NODE, &bfd_debug_peer_cmd); install_element(ENABLE_NODE, &bfd_debug_zebra_cmd); install_element(ENABLE_NODE, &bfd_debug_network_cmd); + install_element(CONFIG_NODE, &bfd_debug_distributed_cmd); install_element(CONFIG_NODE, &bfd_debug_peer_cmd); install_element(CONFIG_NODE, &bfd_debug_zebra_cmd); install_element(CONFIG_NODE, &bfd_debug_network_cmd); |