diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-04-22 18:04:56 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-17 00:27:08 +0000 |
| commit | f1175ba9314200821a47dcffab1fd01c18ee701f (patch) | |
| tree | a3389494784d3d1dbdbd799e666ebb4a6d36c8bb /vrrpd/vrrp_main.c | |
| parent | 4f576e7575f9c1f4b017374a990906130d00dfdd (diff) | |
vrrpd: gracefully shutdown on SIGTERM / SIGINT
Handle kill signals by gracefully destroying all of our VRRP instances.
If any of them are in Master state, send an advert with 0 priority to
notify Backup routers we are going down.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vrrpd/vrrp_main.c')
| -rw-r--r-- | vrrpd/vrrp_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vrrpd/vrrp_main.c b/vrrpd/vrrp_main.c index d6a43be8e8..98b907d013 100644 --- a/vrrpd/vrrp_main.c +++ b/vrrpd/vrrp_main.c @@ -69,10 +69,12 @@ static void sighup(void) } /* SIGINT / SIGTERM handler. */ -static void sigint(void) +static void __attribute__((noreturn)) sigint(void) { zlog_notice("Terminating on signal"); + vrrp_fini(); + exit(0); } |
