summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schweizer <dschweizer@opensourcerouting.org>2020-08-24 08:12:16 +0200
committerDavid Schweizer <dschweizer@opensourcerouting.org>2020-08-24 08:12:16 +0200
commit1b6e7a8874bcd7c5a48d2c849e64b0dd67f49f7e (patch)
tree28f500bc22b9cc641ee9e7661db0894e11fdd68d
parent53d49b1a0e0cc80ff67cbfd4f59e8df8bac8a69a (diff)
bgpd: additional no bgp shutdown cli command
* Added a "no bgp shutdown message MSG..." cli command for ease of use with copy/paste. Because of current limitations with DEFPY/ALIAS and the message string concatenation, a new command instead of an ALIAS had to be implemented. Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
-rw-r--r--bgpd/bgp_vty.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 6938d301fe..3083e8d354 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -3639,6 +3639,18 @@ DEFPY(no_bgp_shutdown, no_bgp_shutdown_cmd, "no bgp shutdown",
return CMD_SUCCESS;
}
+DEFPY(no_bgp_shutdown_msg, no_bgp_shutdown_msg_cmd,
+ "no bgp shutdown message MSG...", NO_STR BGP_STR
+ "Disable administrative shutdown of the BGP instance\n"
+ "Add a shutdown message (RFC 8203)\n" "Shutdown message\n")
+{
+ VTY_DECLVAR_CONTEXT(bgp, bgp);
+
+ bgp_shutdown_disable(bgp);
+
+ return CMD_SUCCESS;
+}
+
DEFUN (neighbor_remote_as,
neighbor_remote_as_cmd,
"neighbor <A.B.C.D|X:X::X:X|WORD> remote-as <(1-4294967295)|internal|external>",
@@ -16081,6 +16093,7 @@ void bgp_vty_init(void)
install_element(BGP_NODE, &bgp_shutdown_cmd);
install_element(BGP_NODE, &bgp_shutdown_msg_cmd);
install_element(BGP_NODE, &no_bgp_shutdown_cmd);
+ install_element(BGP_NODE, &no_bgp_shutdown_msg_cmd);
/* "neighbor remote-as" commands. */
install_element(BGP_NODE, &neighbor_remote_as_cmd);