summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2018-04-05 02:52:08 +0200
committerGitHub <noreply@github.com>2018-04-05 02:52:08 +0200
commitfc429a30d5d94bb8a844f9e1b930fe287f6215a3 (patch)
tree2a2d5a5a78f91651c32e7b4dd1013ede72b89a73
parentMerge pull request #1998 from qlyoung/fix-vrf-keyword-walkup (diff)
parentbgpd, pim: remove undebug (diff)
downloadfrr-fc429a30d5d94bb8a844f9e1b930fe287f6215a3.tar.xz
frr-fc429a30d5d94bb8a844f9e1b930fe287f6215a3.zip
Merge pull request #2002 from qlyoung/remove-undebug
bgpd, pim: remove undebug
-rw-r--r--bgpd/rfapi/vnc_debug.c41
-rw-r--r--lib/command.h2
-rw-r--r--lib/zebra.h2
-rw-r--r--pimd/pim_cmd.c31
4 files changed, 62 insertions, 14 deletions
diff --git a/bgpd/rfapi/vnc_debug.c b/bgpd/rfapi/vnc_debug.c
index 3e9b5ed6b..2b08ea493 100644
--- a/bgpd/rfapi/vnc_debug.c
+++ b/bgpd/rfapi/vnc_debug.c
@@ -85,10 +85,9 @@ DEFUN (debug_bgp_vnc,
DEFUN (no_debug_bgp_vnc,
no_debug_bgp_vnc_cmd,
- "<no debug|undebug> bgp vnc <rfapi-query|import-bi-attach|import-del-remote|verbose>",
+ "no debug bgp vnc <rfapi-query|import-bi-attach|import-del-remote|verbose>",
NO_STR
DEBUG_STR
- "Undebug\n"
BGP_STR
VNC_STR
"rfapi query handling\n"
@@ -98,10 +97,8 @@ DEFUN (no_debug_bgp_vnc,
{
size_t i;
- if (strmatch(argv[0]->text, "no"))
- argc--, argv++;
for (i = 0; i < (sizeof(vncdebug) / sizeof(struct vnc_debug)); ++i) {
- if (strmatch(argv[3]->text, vncdebug[i].name)) {
+ if (strmatch(argv[argc - 1]->text, vncdebug[i].name)) {
if (vty->node == CONFIG_NODE) {
conf_vnc_debug &= ~vncdebug[i].bit;
term_vnc_debug &= ~vncdebug[i].bit;
@@ -117,6 +114,20 @@ DEFUN (no_debug_bgp_vnc,
return CMD_WARNING_CONFIG_FAILED;
}
+#if CONFDATE > 20190402
+CPP_NOTICE("bgpd: time to remove undebug commands")
+#endif
+ALIAS_HIDDEN(no_debug_bgp_vnc,
+ undebug_bgp_vnc_cmd,
+ "undebug bgp vnc <rfapi-query|import-bi-attach|import-del-remote|verbose>",
+ "Undebug\n"
+ BGP_STR
+ VNC_STR
+ "rfapi query handling\n"
+ "import BI atachment\n"
+ "import delete remote routes\n"
+ "verbose logging\n")
+
/***********************************************************************
* no debug bgp vnc all
@@ -124,10 +135,9 @@ DEFUN (no_debug_bgp_vnc,
DEFUN (no_debug_bgp_vnc_all,
no_debug_bgp_vnc_all_cmd,
- "<no debug|undebug> all bgp vnc",
+ "no debug all bgp vnc",
NO_STR
DEBUG_STR
- "Undebug command\n"
"Disable all VNC debugging\n"
BGP_STR
VNC_STR)
@@ -138,6 +148,17 @@ DEFUN (no_debug_bgp_vnc_all,
return CMD_SUCCESS;
}
+#if CONFDATE > 20190402
+CPP_NOTICE("bgpd: time to remove undebug commands")
+#endif
+ALIAS_HIDDEN (no_debug_bgp_vnc_all,
+ undebug_bgp_vnc_all_cmd,
+ "undebug all bgp vnc",
+ "Undebug\n"
+ "Disable all VNC debugging\n"
+ BGP_STR
+ VNC_STR)
+
/***********************************************************************
* show/save
***********************************************************************/
@@ -188,6 +209,12 @@ void vnc_debug_init(void)
install_element(ENABLE_NODE, &debug_bgp_vnc_cmd);
install_element(CONFIG_NODE, &debug_bgp_vnc_cmd);
install_element(ENABLE_NODE, &no_debug_bgp_vnc_cmd);
+ install_element(CONFIG_NODE, &no_debug_bgp_vnc_cmd);
+ install_element(ENABLE_NODE, &undebug_bgp_vnc_cmd);
+ install_element(CONFIG_NODE, &undebug_bgp_vnc_cmd);
install_element(ENABLE_NODE, &no_debug_bgp_vnc_all_cmd);
+ install_element(CONFIG_NODE, &no_debug_bgp_vnc_all_cmd);
+ install_element(ENABLE_NODE, &undebug_bgp_vnc_all_cmd);
+ install_element(CONFIG_NODE, &undebug_bgp_vnc_all_cmd);
}
diff --git a/lib/command.h b/lib/command.h
index 26c1ac73b..7d5c37220 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -329,7 +329,7 @@ struct cmd_node {
#define BGP_SOFT_RSCLIENT_RIB_STR "Soft reconfig for rsclient RIB\n"
#define OSPF_STR "OSPF information\n"
#define NEIGHBOR_STR "Specify neighbor router\n"
-#define DEBUG_STR "Debugging functions (see also 'undebug')\n"
+#define DEBUG_STR "Debugging functions\n"
#define UNDEBUG_STR "Disable debugging functions (see also 'debug')\n"
#define ROUTER_STR "Enable a routing process\n"
#define AS_STR "AS number\n"
diff --git a/lib/zebra.h b/lib/zebra.h
index f4f104299..255e24722 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -25,6 +25,8 @@
#include "config.h"
#endif /* HAVE_CONFIG_H */
+#include "compiler.h"
+
#ifdef SUNOS_5
#define _XPG4_2
typedef unsigned int uint32_t;
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 48b85fc05..35514a85d 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -7226,8 +7226,13 @@ DEFUN (no_debug_msdp,
return CMD_SUCCESS;
}
-ALIAS(no_debug_msdp, undebug_msdp_cmd, "undebug msdp",
- UNDEBUG_STR DEBUG_MSDP_STR)
+#if CONFDATE > 20190402
+CPP_NOTICE("bgpd: time to remove undebug commands")
+#endif
+ALIAS_HIDDEN (no_debug_msdp,
+ undebug_msdp_cmd,
+ "undebug msdp",
+ UNDEBUG_STR DEBUG_MSDP_STR)
DEFUN (debug_msdp_events,
debug_msdp_events_cmd,
@@ -7252,8 +7257,15 @@ DEFUN (no_debug_msdp_events,
return CMD_SUCCESS;
}
-ALIAS(no_debug_msdp_events, undebug_msdp_events_cmd, "undebug msdp events",
- UNDEBUG_STR DEBUG_MSDP_STR DEBUG_MSDP_EVENTS_STR)
+#if CONFDATE > 20190402
+CPP_NOTICE("bgpd: time to remove undebug commands")
+#endif
+ALIAS_HIDDEN (no_debug_msdp_events,
+ undebug_msdp_events_cmd,
+ "undebug msdp events",
+ UNDEBUG_STR
+ DEBUG_MSDP_STR
+ DEBUG_MSDP_EVENTS_STR)
DEFUN (debug_msdp_packets,
debug_msdp_packets_cmd,
@@ -7278,8 +7290,15 @@ DEFUN (no_debug_msdp_packets,
return CMD_SUCCESS;
}
-ALIAS(no_debug_msdp_packets, undebug_msdp_packets_cmd, "undebug msdp packets",
- UNDEBUG_STR DEBUG_MSDP_STR DEBUG_MSDP_PACKETS_STR)
+#if CONFDATE > 20190402
+CPP_NOTICE("bgpd: time to remove undebug commands")
+#endif
+ALIAS_HIDDEN (no_debug_msdp_packets,
+ undebug_msdp_packets_cmd,
+ "undebug msdp packets",
+ UNDEBUG_STR
+ DEBUG_MSDP_STR
+ DEBUG_MSDP_PACKETS_STR)
DEFUN (debug_mtrace,
debug_mtrace_cmd,