summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/ipc.c
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2013-09-03 09:21:38 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2013-09-03 09:21:38 +0000
commit3a46b2e4c37dd915f3a6f15fc551ecac02132dbe (patch)
tree83c2ad6f2db057a64a0974c3127b1c25841989e2 /usr.sbin/nsd/ipc.c
parent6caac9703816ae62cf497fcfe7da3cbaa5da11e4 (diff)
update to NSD 3.2.16, ok deraadt@ brad@
Diffstat (limited to 'usr.sbin/nsd/ipc.c')
-rw-r--r--usr.sbin/nsd/ipc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/nsd/ipc.c b/usr.sbin/nsd/ipc.c
index a380815b50d..28e1cc5e7ec 100644
--- a/usr.sbin/nsd/ipc.c
+++ b/usr.sbin/nsd/ipc.c
@@ -134,6 +134,14 @@ child_handle_parent_command(netio_type *ATTR_UNUSED(netio),
case NSD_QUIT:
ipc_child_quit(data->nsd);
break;
+ case NSD_QUIT_CHILD:
+ /* close our listening sockets and ack */
+ server_close_all_sockets(data->nsd->udp, data->nsd->ifs);
+ server_close_all_sockets(data->nsd->tcp, data->nsd->ifs);
+ /* mode == NSD_QUIT_CHILD */
+ (void)write(handler->fd, &mode, sizeof(mode));
+ ipc_child_quit(data->nsd);
+ break;
case NSD_ZONE_STATE:
data->conn->is_reading = 1;
data->conn->total_bytes = 0;
@@ -200,7 +208,8 @@ parent_handle_xfrd_command(netio_type *ATTR_UNUSED(netio),
}
if (len == 0)
{
- DEBUG(DEBUG_IPC,1, (LOG_ERR, "handle_xfrd_command: xfrd closed channel."));
+ /* xfrd closed, we must quit */
+ DEBUG(DEBUG_IPC,1, (LOG_INFO, "handle_xfrd_command: xfrd closed channel."));
close(handler->fd);
handler->fd = -1;
return;
@@ -208,6 +217,7 @@ parent_handle_xfrd_command(netio_type *ATTR_UNUSED(netio),
switch (mode) {
case NSD_RELOAD:
+ DEBUG(DEBUG_IPC,1, (LOG_INFO, "parent handle xfrd command RELOAD"));
data->nsd->signal_hint_reload = 1;
break;
case NSD_QUIT: