-/* $OpenBSD: ca.c,v 1.100 2024/02/06 13:10:56 tobhe Exp $ */
+/* $OpenBSD: ca.c,v 1.101 2024/02/13 12:25:11 tobhe Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
unsigned int mode;
switch (imsg->hdr.type) {
+ case IMSG_CTL_ACTIVE:
+ case IMSG_CTL_PASSIVE:
+ /*
+ * send back to indicate we have processed
+ * all messages from parent.
+ */
+ proc_compose(&env->sc_ps, PROC_PARENT, imsg->hdr.type, NULL, 0);
+ break;
case IMSG_CTL_RESET:
IMSG_SIZE_CHECK(imsg, &mode);
memcpy(&mode, imsg->data, sizeof(mode));
-/* $OpenBSD: config.c,v 1.95 2024/01/17 08:25:02 claudio Exp $ */
+/* $OpenBSD: config.c,v 1.96 2024/02/13 12:25:11 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
{
unsigned int type;
+ /*
+ * In order to control the startup of the processes,
+ * the messages are sent in this order:
+ * PROC_PARENT -> PROC_CERT -> PROC_PARENT -> PROC_IKEV2
+ * so PROC_CERT is ready before PROC_IKEV2 is activated.
+ */
type = passive ? IMSG_CTL_PASSIVE : IMSG_CTL_ACTIVE;
- proc_compose(&env->sc_ps, PROC_IKEV2, type, NULL, 0);
+ proc_compose(&env->sc_ps, PROC_CERT, type, NULL, 0);
return (0);
}
-/* $OpenBSD: iked.c,v 1.67 2024/01/15 15:29:00 tobhe Exp $ */
+/* $OpenBSD: iked.c,v 1.68 2024/02/13 12:25:11 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
struct iked *env = iked_env;
switch (imsg->hdr.type) {
+ case IMSG_CTL_ACTIVE:
+ case IMSG_CTL_PASSIVE:
+ proc_forward_imsg(&env->sc_ps, imsg, PROC_IKEV2, -1);
+ break;
case IMSG_OCSP_FD:
ocsp_connect(env, imsg);
break;