]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib, vtysh: Modify start/end configuration commands to be more hidden
authorDonald Sharp <sharpd@nvidia.com>
Tue, 15 Dec 2020 19:21:56 +0000 (14:21 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 15 Dec 2020 20:33:17 +0000 (15:33 -0500)
There exists a world where some people have put `end` in their
configuration.  Then vtysh will command search for it and find
it and then bad things happen.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib/lib_vty.c
vtysh/vtysh_config.c

index 0cc25f24ed66052ab0ccbe388e16c67bfccce674..cd8b5c98095369fef4839c30c42e0f343a35c1f5 100644 (file)
@@ -222,7 +222,7 @@ static struct call_back {
 
 DEFUN_HIDDEN (start_config,
              start_config_cmd,
-             "start_configuration",
+             "XFRR_start_configuration",
              "The Beginning of Configuration\n")
 {
        callback.readin_time = monotime(NULL);
@@ -235,7 +235,7 @@ DEFUN_HIDDEN (start_config,
 
 DEFUN_HIDDEN (end_config,
              end_config_cmd,
-             "end_configuration",
+             "XFRR_end_configuration",
              "The End of Configuration\n")
 {
        time_t readin_time;
index f35a8af4b9942ca1aefd3ee81d1952650bef301e..c8154d9694a50a5e7582c69a81b2d5d42a4f373b 100644 (file)
@@ -528,12 +528,12 @@ static int vtysh_read_file(FILE *confp)
        vtysh_execute_no_pager("enable");
        vtysh_execute_no_pager("configure terminal");
 
-       vtysh_execute_no_pager("start_configuration");
+       vtysh_execute_no_pager("XFRR_start_configuration");
 
        /* Execute configuration file. */
        ret = vtysh_config_from_file(vty, confp);
 
-       vtysh_execute_no_pager("end_configuration");
+       vtysh_execute_no_pager("XFRR_end_configuration");
 
        vtysh_execute_no_pager("end");
        vtysh_execute_no_pager("disable");