diff options
author | sthen <sthen@openbsd.org> | 2013-02-18 10:17:40 +0000 |
---|---|---|
committer | sthen <sthen@openbsd.org> | 2013-02-18 10:17:40 +0000 |
commit | 2c1ae0729319ce992791abd83d0d82007e9247f1 (patch) | |
tree | 6f6887392841c31631df5aad681dfdac0c645acc /usr.sbin/nsd/ipc.c | |
parent | typo fix; from pgoyette, netbsd -r1.15 and -r1.11, respectively; (diff) | |
download | wireguard-openbsd-2c1ae0729319ce992791abd83d0d82007e9247f1.tar.xz wireguard-openbsd-2c1ae0729319ce992791abd83d0d82007e9247f1.zip |
Update to NSD 3.2.15, ok brad@ phessler@ deraadt@ also tested by okan@
Diffstat (limited to 'usr.sbin/nsd/ipc.c')
-rw-r--r-- | usr.sbin/nsd/ipc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/nsd/ipc.c b/usr.sbin/nsd/ipc.c index b2911e39f6b..a380815b50d 100644 --- a/usr.sbin/nsd/ipc.c +++ b/usr.sbin/nsd/ipc.c @@ -72,6 +72,18 @@ handle_xfrd_zone_state(struct nsd* nsd, buffer_type* packet) return zone; } +static void +ipc_child_quit(struct nsd* nsd) +{ + /* call shutdown and quit routines */ + nsd->mode = NSD_QUIT; +#ifdef BIND8_STATS + bind8_stats(nsd); +#endif /* BIND8_STATS */ + server_shutdown(nsd); + exit(0); +} + void child_handle_parent_command(netio_type *ATTR_UNUSED(netio), netio_handler_type *handler, @@ -117,9 +129,11 @@ child_handle_parent_command(netio_type *ATTR_UNUSED(netio), switch (mode) { case NSD_STATS: - case NSD_QUIT: data->nsd->mode = mode; break; + case NSD_QUIT: + ipc_child_quit(data->nsd); + break; case NSD_ZONE_STATE: data->conn->is_reading = 1; data->conn->total_bytes = 0; |