diff options
| author | Fredi Raspall <fredi@voltanet.io> | 2021-05-27 20:15:15 +0200 |
|---|---|---|
| committer | Emanuele Di Pascale <emanuele@voltanet.io> | 2021-09-28 10:20:58 +0200 |
| commit | 6f609c4980e2ae057476589374ee9bb66624fde0 (patch) | |
| tree | e57882bd57e936902710f0258f2dc7dee3eabd89 | |
| parent | 01236d7aa7dab0891fa25012f87bc1fe3bbcfe9b (diff) | |
ospfd: fix display of debug flags
* Some of the debug flags were not shown in show debugging.
* The check for TI-LFA debug was made against the wrong variable.
* Some of the debugs were not cleared with 'no debug ospf'
Signed-off-by: Fredi Raspall <fredi@voltanet.io>
| -rw-r--r-- | ospfd/ospf_dump.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index f11c84b092..29fda822bf 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -1616,11 +1616,15 @@ DEFUN (no_debug_ospf, DEBUG_OFF(nsm, NSM_EVENTS); DEBUG_OFF(nsm, NSM_STATUS); DEBUG_OFF(nsm, NSM_TIMERS); + DEBUG_OFF(event, EVENT); DEBUG_OFF(zebra, ZEBRA); DEBUG_OFF(zebra, ZEBRA_INTERFACE); DEBUG_OFF(zebra, ZEBRA_REDISTRIBUTE); DEBUG_OFF(defaultinfo, DEFAULTINFO); DEBUG_OFF(ldp_sync, LDP_SYNC); + DEBUG_OFF(te, TE); + DEBUG_OFF(sr, SR); + DEBUG_OFF(ti_lfa, TI_LFA); /* BFD debugging is two parts: OSPF and library. */ DEBUG_OFF(bfd, BFD_LIB); @@ -1653,6 +1657,9 @@ DEFUN (no_debug_ospf, TERM_DEBUG_OFF(zebra, ZEBRA_REDISTRIBUTE); TERM_DEBUG_OFF(defaultinfo, DEFAULTINFO); TERM_DEBUG_OFF(ldp_sync, LDP_SYNC); + TERM_DEBUG_OFF(te, TE); + TERM_DEBUG_OFF(sr, SR); + TERM_DEBUG_OFF(ti_lfa, TI_LFA); TERM_DEBUG_OFF(bfd, BFD_LIB); return CMD_SUCCESS; @@ -1763,6 +1770,18 @@ static int show_debugging_ospf_common(struct vty *vty) if (IS_DEBUG_OSPF(gr, GR) == OSPF_DEBUG_GR) vty_out(vty, " OSPF Graceful Restart debugging is on\n"); + /* Show debug status for TE */ + if (IS_DEBUG_OSPF(te, TE) == OSPF_DEBUG_TE) + vty_out(vty, " OSPF TE debugging is on\n"); + + /* Show debug status for SR */ + if (IS_DEBUG_OSPF(sr, SR) == OSPF_DEBUG_SR) + vty_out(vty, " OSPF SR debugging is on\n"); + + /* Show debug status for TI-LFA */ + if (IS_DEBUG_OSPF(ti_lfa, TI_LFA) == OSPF_DEBUG_TI_LFA) + vty_out(vty, " OSPF TI-LFA debugging is on\n"); + if (IS_DEBUG_OSPF(bfd, BFD_LIB) == OSPF_DEBUG_BFD_LIB) vty_out(vty, " OSPF BFD integration library debugging is on\n"); @@ -1937,7 +1956,7 @@ static int config_write_debug(struct vty *vty) } /* debug ospf sr ti-lfa */ - if (IS_CONF_DEBUG_OSPF(sr, TI_LFA) == OSPF_DEBUG_TI_LFA) { + if (IS_CONF_DEBUG_OSPF(ti_lfa, TI_LFA) == OSPF_DEBUG_TI_LFA) { vty_out(vty, "debug ospf%s ti-lfa\n", str); write = 1; } |
