diff options
Diffstat (limited to 'bgpd/bgp_debug.c')
| -rw-r--r-- | bgpd/bgp_debug.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 2ca9e5ee13..f3d387a0e1 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -30,6 +30,7 @@ #include "memory.h" #include "queue.h" #include "filter.h" +#include "hook.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_aspath.h" @@ -47,6 +48,9 @@ #include "bgpd/bgp_vty.h" #include "bgpd/bgp_flowspec.h" +DEFINE_HOOK(bgp_hook_config_write_debug, (struct vty *vty, bool running), + (vty, running)) + unsigned long conf_bgp_debug_as4; unsigned long conf_bgp_debug_neighbor_events; unsigned long conf_bgp_debug_events; @@ -2168,7 +2172,7 @@ DEFUN_NOSH (show_debugging_bgp, vty_out(vty, " BGP policy based routing debugging is on\n"); if (BGP_DEBUG(pbr, PBR_ERROR)) vty_out(vty, " BGP policy based routing error debugging is on\n"); - + hook_call(bgp_hook_config_write_debug, vty, false); vty_out(vty, "\n"); return CMD_SUCCESS; } @@ -2284,6 +2288,9 @@ static int bgp_config_write_debug(struct vty *vty) vty_out(vty, "debug bgp graceful-restart\n"); write++; } + + if (hook_call(bgp_hook_config_write_debug, vty, true)) + write++; return write; } |
