From 1e12ebbca3e06dc905ccc9dc29c1e4cb09b2d1b6 Mon Sep 17 00:00:00 2001 From: David Schweizer Date: Mon, 17 Aug 2020 17:43:57 +0200 Subject: [PATCH] bgpd: fix for BGP instance shutdown CLI error. * Replaced alias for bgp shutdown command with separate regular command to prevent internal CLI errors. Signed-off-by: David Schweizer --- bgpd/bgp_vty.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index cf6c776666..20c2f262e2 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -3600,7 +3600,7 @@ DEFUN (bgp_default_shutdown, return CMD_SUCCESS; } -DEFPY (bgp_shutdown, +DEFPY (bgp_shutdown_msg, bgp_shutdown_msg_cmd, "bgp shutdown message MSG...", BGP_STR @@ -3621,10 +3621,17 @@ DEFPY (bgp_shutdown, return CMD_SUCCESS; } -ALIAS(bgp_shutdown, bgp_shutdown_cmd, - "bgp shutdown", - BGP_STR - "Enable administrative shutdown of the BGP instance\n") +DEFPY (bgp_shutdown, bgp_shutdown_cmd, + "bgp shutdown", + BGP_STR + "Enable administrative shutdown of the BGP instance\n") +{ + VTY_DECLVAR_CONTEXT(bgp, bgp); + + bgp_shutdown_enable(bgp, NULL); + + return CMD_SUCCESS; +} DEFPY (no_bgp_shutdown, no_bgp_shutdown_cmd,