From 8a68316eb96be1fecf91ca395f3321aa99997ad2 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 18 Jun 2019 16:27:21 +0200 Subject: Nest: Add command to request graceful restart When 'graceful down' command is entered, protocols are shut down with regard to graceful restart. Namely Kernel protocol does not remove routes and BGP protocol does not send notification, just closes the connection. --- sysdep/unix/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sysdep/unix/main.c') diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index c381b44f..39465aa8 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -565,14 +565,14 @@ cmd_shutdown(void) return; cli_msg(7, "Shutdown requested"); - order_shutdown(); + order_shutdown(0); } void async_shutdown(void) { DBG("Shutting down...\n"); - order_shutdown(); + order_shutdown(0); } void @@ -584,6 +584,17 @@ sysdep_shutdown_done(void) exit(0); } +void +cmd_graceful_restart(void) +{ + if (cli_access_restricted()) + return; + + cli_msg(25, "Graceful restart requested"); + order_shutdown(1); +} + + /* * Signals */ -- cgit v1.2.3