diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2024-08-24 16:34:24 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2024-08-24 16:34:24 +0000 |
commit | 366002b60f43b5692adfdaab11169fed40ab750f (patch) | |
tree | 2d435356a658c3f8eb28f383739edf7ceefebf3c /sbin/slaacd/slaacd.c | |
parent | 5224ccc6610607091d1227d38e2a12193c38969d (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.c | 12 |
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) |