From 8de2b3d9903a79107885b5304d55941dfa56b2c1 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 15 Dec 2020 14:21:56 -0500 Subject: [PATCH] lib, vtysh: Modify start/end configuration commands to be more hidden 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 --- lib/lib_vty.c | 4 ++-- vtysh/vtysh_config.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/lib_vty.c b/lib/lib_vty.c index 0cc25f24ed..cd8b5c9809 100644 --- a/lib/lib_vty.c +++ b/lib/lib_vty.c @@ -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; diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index f35a8af4b9..c8154d9694 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -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"); -- 2.39.5