summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-06-18 16:27:21 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-06-30 21:29:24 +0200
commit8a68316eb96be1fecf91ca395f3321aa99997ad2 (patch)
treec38f9ef7d4733585c4658af5badbfa5f1a5e2ede /nest/proto.c
parentbdf2e55d98636eacaac8188ee0bd000cc10d217c (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 'nest/proto.c')
-rw-r--r--nest/proto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 415471c4..beb3f393 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -1048,6 +1048,11 @@ protos_commit(struct config *new, struct config *old, int force_reconfig, int ty
p->down_code = PDC_CF_REMOVE;
p->cf_new = NULL;
}
+ else if (new->gr_down)
+ {
+ p->down_code = PDC_CMD_GR_DOWN;
+ p->cf_new = NULL;
+ }
else /* global shutdown */
{
p->down_code = PDC_CMD_SHUTDOWN;