summaryrefslogtreecommitdiff
path: root/sbin/slaacd/slaacd.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2024-08-24 16:34:24 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2024-08-24 16:34:24 +0000
commit366002b60f43b5692adfdaab11169fed40ab750f (patch)
tree2d435356a658c3f8eb28f383739edf7ceefebf3c /sbin/slaacd/slaacd.c
parent5224ccc6610607091d1227d38e2a12193c38969d (diff)
Stop peeking into struct imsg when relaying control messages.
pointed out by & OK tb
Diffstat (limited to 'sbin/slaacd/slaacd.c')
-rw-r--r--sbin/slaacd/slaacd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/slaacd/slaacd.c b/sbin/slaacd/slaacd.c
index c76bae07ed3..da9a98ecff6 100644
--- a/sbin/slaacd/slaacd.c
+++ b/sbin/slaacd/slaacd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slaacd.c,v 1.71 2024/08/24 09:44:41 florian Exp $ */
+/* $OpenBSD: slaacd.c,v 1.72 2024/08/24 16:34:23 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -587,6 +587,16 @@ imsg_compose_event(struct imsgev *iev, uint16_t type, uint32_t peerid,
return (ret);
}
+int
+imsg_forward_event(struct imsgev *iev, struct imsg *imsg)
+{
+ int ret;
+
+ if ((ret = imsg_forward(&iev->ibuf, imsg)) != -1)
+ imsg_event_add(iev);
+
+ return (ret);
+}
static int
main_imsg_send_ipc_sockets(struct imsgbuf *frontend_buf,
struct imsgbuf *engine_buf)