diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-06-18 16:27:21 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-06-30 21:29:24 +0200 |
commit | 8a68316eb96be1fecf91ca395f3321aa99997ad2 (patch) | |
tree | c38f9ef7d4733585c4658af5badbfa5f1a5e2ede /sysdep/unix/main.c | |
parent | bdf2e55d98636eacaac8188ee0bd000cc10d217c (diff) |
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.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r-- | sysdep/unix/main.c | 15 |
1 files changed, 13 insertions, 2 deletions
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 */ |