summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rad/engine.c
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2018-07-11 19:05:25 +0000
committerflorian <florian@openbsd.org>2018-07-11 19:05:25 +0000
commit92b9e3a91f8b117255cfe1fc46265ecf40b7ce68 (patch)
tree01175c97af291b3a1b392a3b54e4afe13abd81fd /usr.sbin/rad/engine.c
parenttreat ssh_packet_write_wait() errors as fatal; ok djm@ (diff)
downloadwireguard-openbsd-92b9e3a91f8b117255cfe1fc46265ecf40b7ce68.tar.xz
wireguard-openbsd-92b9e3a91f8b117255cfe1fc46265ecf40b7ce68.zip
cleanly shutdown by sending advertisement with lifetime 0
Diffstat (limited to 'usr.sbin/rad/engine.c')
-rw-r--r--usr.sbin/rad/engine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/rad/engine.c b/usr.sbin/rad/engine.c
index 4f568e37ee7..9ecb93da44b 100644
--- a/usr.sbin/rad/engine.c
+++ b/usr.sbin/rad/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.5 2018/07/11 17:32:05 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.6 2018/07/11 19:05:25 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -239,6 +239,9 @@ engine_dispatch_frontend(int fd, short event, void *bula)
memcpy(&verbose, imsg.data, sizeof(verbose));
log_setverbose(verbose);
break;
+ case IMSG_SHUTDOWN:
+ engine_imsg_compose_frontend(IMSG_SHUTDOWN, 0, NULL, 0);
+ break;
default:
log_debug("%s: unexpected imsg %d", __func__,
imsg.hdr.type);