diff options
author | Mark Stapp <mjs@voltanet.io> | 2021-04-05 19:48:21 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2021-04-05 21:53:48 +0200 |
commit | 04dda092186aec1cd3c89e787918b109c075e162 (patch) | |
tree | 6d90d00d6149acef2d26252d4262a9daf9cd98d8 /zebra | |
parent | Merge pull request #8240 from reubendowle/fixes/nhrp-nat (diff) | |
download | frr-04dda092186aec1cd3c89e787918b109c075e162.tar.xz frr-04dda092186aec1cd3c89e787918b109c075e162.zip |
zebra: add 'detail' mpls debug setting
Add setting and cli for 'debug zebra mpls detail'.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/debug.c | 27 | ||||
-rw-r--r-- | zebra/debug.h | 5 |
2 files changed, 24 insertions, 8 deletions
diff --git a/zebra/debug.c b/zebra/debug.c index 21fa765c6..05eed0d26 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -94,8 +94,11 @@ DEFUN_NOSH (show_debugging_zebra, vty_out(vty, " Zebra detailed next-hop tracking debugging is on\n"); else if (IS_ZEBRA_DEBUG_NHT) vty_out(vty, " Zebra next-hop tracking debugging is on\n"); - if (IS_ZEBRA_DEBUG_MPLS) + if (IS_ZEBRA_DEBUG_MPLS_DETAIL) + vty_out(vty, " Zebra detailed MPLS debugging is on\n"); + else if (IS_ZEBRA_DEBUG_MPLS) vty_out(vty, " Zebra MPLS debugging is on\n"); + if (IS_ZEBRA_DEBUG_VXLAN) vty_out(vty, " Zebra VXLAN debugging is on\n"); if (IS_ZEBRA_DEBUG_PW) @@ -159,14 +162,19 @@ DEFUN (debug_zebra_nht, return CMD_SUCCESS; } -DEFUN (debug_zebra_mpls, +DEFPY (debug_zebra_mpls, debug_zebra_mpls_cmd, - "debug zebra mpls", + "debug zebra mpls [detailed$detail]", DEBUG_STR "Zebra configuration\n" - "Debug option set for zebra MPLS LSPs\n") + "Debug option set for zebra MPLS LSPs\n" + "Debug option for detailed info\n") { zebra_debug_mpls = ZEBRA_DEBUG_MPLS; + + if (detail) + zebra_debug_mpls |= ZEBRA_DEBUG_MPLS_DETAILED; + return CMD_SUCCESS; } @@ -422,11 +430,12 @@ DEFUN (no_debug_zebra_nht, DEFUN (no_debug_zebra_mpls, no_debug_zebra_mpls_cmd, - "no debug zebra mpls", + "no debug zebra mpls [detailed]", NO_STR DEBUG_STR "Zebra configuration\n" - "Debug option set for zebra MPLS LSPs\n") + "Debug option set for zebra MPLS LSPs\n" + "Debug option for zebra detailed info\n") { zebra_debug_mpls = 0; return CMD_SUCCESS; @@ -628,10 +637,14 @@ static int config_write_debug(struct vty *vty) write++; } - if (IS_ZEBRA_DEBUG_MPLS) { + if (IS_ZEBRA_DEBUG_MPLS_DETAIL) { + vty_out(vty, "debug zebra mpls detailed\n"); + write++; + } else if (IS_ZEBRA_DEBUG_MPLS) { vty_out(vty, "debug zebra mpls\n"); write++; } + if (IS_ZEBRA_DEBUG_VXLAN) { vty_out(vty, "debug zebra vxlan\n"); write++; diff --git a/zebra/debug.h b/zebra/debug.h index 86506846a..dc44367d0 100644 --- a/zebra/debug.h +++ b/zebra/debug.h @@ -48,7 +48,8 @@ extern "C" { #define ZEBRA_DEBUG_NHT 0x01 #define ZEBRA_DEBUG_NHT_DETAILED 0x02 -#define ZEBRA_DEBUG_MPLS 0x01 +#define ZEBRA_DEBUG_MPLS 0x01 +#define ZEBRA_DEBUG_MPLS_DETAILED 0x02 #define ZEBRA_DEBUG_VXLAN 0x01 @@ -93,6 +94,8 @@ extern "C" { #define IS_ZEBRA_DEBUG_NHT_DETAILED (zebra_debug_nht & ZEBRA_DEBUG_NHT_DETAILED) #define IS_ZEBRA_DEBUG_MPLS (zebra_debug_mpls & ZEBRA_DEBUG_MPLS) +#define IS_ZEBRA_DEBUG_MPLS_DETAIL \ + (zebra_debug_mpls & ZEBRA_DEBUG_MPLS_DETAILED) #define IS_ZEBRA_DEBUG_VXLAN (zebra_debug_vxlan & ZEBRA_DEBUG_VXLAN) #define IS_ZEBRA_DEBUG_PW (zebra_debug_pw & ZEBRA_DEBUG_PW) |