From ac8c9518ab874d32ee3c3c3de28d1f8b24268118 Mon Sep 17 00:00:00 2001 From: rgirada Date: Sat, 5 Sep 2020 09:41:04 -0700 Subject: [PATCH] ospfd: OSPF external summarisation debug support Description: Changes to enable/disable debugs for external LSA sumarisation. Signed-off-by: Rajesh Girada --- ospfd/ospf_dump.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index ba045e0418..e15c9c42c7 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -1001,6 +1001,8 @@ static int debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, DEBUG_ON(lsa, LSA_INSTALL); else if (strmatch(argv[arg_base]->text, "refresh")) DEBUG_ON(lsa, LSA_REFRESH); + else if (strmatch(argv[arg_base]->text, "aggregate")) + DEBUG_ON(lsa, EXTNL_LSA_AGGR); } return CMD_SUCCESS; @@ -1018,6 +1020,8 @@ static int debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, TERM_DEBUG_ON(lsa, LSA_INSTALL); else if (strmatch(argv[arg_base]->text, "refresh")) TERM_DEBUG_ON(lsa, LSA_REFRESH); + else if (strmatch(argv[arg_base]->text, "aggregate")) + TERM_DEBUG_ON(lsa, EXTNL_LSA_AGGR); } return CMD_SUCCESS; @@ -1025,21 +1029,23 @@ static int debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, DEFUN (debug_ospf_lsa, debug_ospf_lsa_cmd, - "debug ospf lsa []", + "debug ospf lsa []", DEBUG_STR OSPF_STR "OSPF Link State Advertisement\n" "LSA Generation\n" "LSA Flooding\n" "LSA Install/Delete\n" - "LSA Refresh\n") + "LSA Refresh\n" + "External LSA Aggregation\n") { return debug_ospf_lsa_common(vty, 3, argc, argv); } DEFUN (debug_ospf_instance_lsa, debug_ospf_instance_lsa_cmd, - "debug ospf (1-65535) lsa []", + "debug ospf (1-65535) lsa " + "[]", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1047,7 +1053,8 @@ DEFUN (debug_ospf_instance_lsa, "LSA Generation\n" "LSA Flooding\n" "LSA Install/Delete\n" - "LSA Refresh\n") + "LSA Refresh\n" + "External LSA Aggregation\n") { int idx_number = 2; unsigned short instance = 0; @@ -1075,6 +1082,8 @@ static int no_debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, DEBUG_OFF(lsa, LSA_INSTALL); else if (strmatch(argv[arg_base]->text, "refresh")) DEBUG_OFF(lsa, LSA_REFRESH); + else if (strmatch(argv[arg_base]->text, "aggregate")) + DEBUG_OFF(lsa, EXTNL_LSA_AGGR); } return CMD_SUCCESS; @@ -1092,6 +1101,8 @@ static int no_debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, TERM_DEBUG_OFF(lsa, LSA_INSTALL); else if (strmatch(argv[arg_base]->text, "refresh")) TERM_DEBUG_OFF(lsa, LSA_REFRESH); + else if (strmatch(argv[arg_base]->text, "aggregate")) + TERM_DEBUG_OFF(lsa, EXTNL_LSA_AGGR); } return CMD_SUCCESS; @@ -1099,7 +1110,7 @@ static int no_debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, DEFUN (no_debug_ospf_lsa, no_debug_ospf_lsa_cmd, - "no debug ospf lsa []", + "no debug ospf lsa []", NO_STR DEBUG_STR OSPF_STR @@ -1107,14 +1118,16 @@ DEFUN (no_debug_ospf_lsa, "LSA Generation\n" "LSA Flooding\n" "LSA Install/Delete\n" - "LSA Refres\n") + "LSA Refres\n" + "External LSA Aggregation\n") { return no_debug_ospf_lsa_common(vty, 4, argc, argv); } DEFUN (no_debug_ospf_instance_lsa, no_debug_ospf_instance_lsa_cmd, - "no debug ospf (1-65535) lsa []", + "no debug ospf (1-65535) lsa " + "[]", NO_STR DEBUG_STR OSPF_STR @@ -1123,7 +1136,8 @@ DEFUN (no_debug_ospf_instance_lsa, "LSA Generation\n" "LSA Flooding\n" "LSA Install/Delete\n" - "LSA Refres\n") + "LSA Refres\n" + "External LSA Aggregation\n") { int idx_number = 3; unsigned short instance = 0; -- 2.39.5