summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/control.c
diff options
context:
space:
mode:
authorPierre-Yves Ritschard <pyr@cvs.openbsd.org>2007-06-07 07:19:51 +0000
committerPierre-Yves Ritschard <pyr@cvs.openbsd.org>2007-06-07 07:19:51 +0000
commit0a9bb0d1fab75b6428acbeeb5a42e6ce76467cf6 (patch)
treea4c324da285797a88895b7543de54beddf214f19 /usr.sbin/relayd/control.c
parente0d66f1005b177e1fbe63f0b4833c5557e3fb6ea (diff)
(finally) Enable reload support for layer 3 configurations.
Hoststated can be reloaded either by sending SIGHUP to the parent process or by using ``hoststatectl reload'' discussed and ok reyk@
Diffstat (limited to 'usr.sbin/relayd/control.c')
-rw-r--r--usr.sbin/relayd/control.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/relayd/control.c b/usr.sbin/relayd/control.c
index e4f42402748..33d4dca084a 100644
--- a/usr.sbin/relayd/control.c
+++ b/usr.sbin/relayd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.15 2007/05/29 23:19:18 pyr Exp $ */
+/* $OpenBSD: control.c,v 1.16 2007/06/07 07:19:50 pyr Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -318,8 +318,16 @@ control_dispatch_imsg(int fd, short event, void *arg)
NULL, 0);
break;
}
- imsg_compose(&c->ibuf, IMSG_CTL_FAIL, 0, 0, NULL, 0);
imsg_compose(ibuf_main, IMSG_CTL_RELOAD, 0, 0, NULL, 0);
+ /*
+ * we unconditionnaly return a CTL_OK imsg because
+ * we have no choice.
+ *
+ * so in this case, the reply hoststatectl gets means
+ * that the reload command has been set,
+ * it doesn't say wether the command succeeded or not.
+ */
+ imsg_compose(&c->ibuf, IMSG_CTL_OK, 0, 0, NULL, 0);
break;
case IMSG_CTL_NOTIFY:
if (c->flags & CTL_CONN_NOTIFY) {