From: claudio Date: Thu, 14 Dec 2023 09:58:59 +0000 (+0000) Subject: Use imsg_get_fd() to access the fd passed with the imsg. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8de8a5ba4039ea34f6764abb0b564256d05a1bdc;p=openbsd Use imsg_get_fd() to access the fd passed with the imsg. Go ahead florian@ OK tb@ --- diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c index 07b818a6909..18e716ee16b 100644 --- a/sbin/slaacd/engine.c +++ b/sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.85 2023/04/30 13:08:40 phessler Exp $ */ +/* $OpenBSD: engine.c,v 1.86 2023/12/14 09:58:59 claudio Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -661,7 +661,7 @@ engine_dispatch_main(int fd, short event, void *bula) fatalx("%s: received unexpected imsg fd " "to engine", __func__); - if ((fd = imsg.fd) == -1) + if ((fd = imsg_get_fd(&imsg)) == -1) fatalx("%s: expected to receive imsg fd to " "engine but didn't receive any", __func__); diff --git a/sbin/slaacd/frontend.c b/sbin/slaacd/frontend.c index 24cf5c71cfc..25b6fe2ce34 100644 --- a/sbin/slaacd/frontend.c +++ b/sbin/slaacd/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.64 2022/07/12 16:54:59 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.65 2023/12/14 09:58:59 claudio Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -314,7 +314,7 @@ frontend_dispatch_main(int fd, short event, void *bula) fatalx("%s: received unexpected imsg fd " "to frontend", __func__); - if ((fd = imsg.fd) == -1) + if ((fd = imsg_get_fd(&imsg)) == -1) fatalx("%s: expected to receive imsg fd to " "frontend but didn't receive any", __func__); @@ -332,7 +332,7 @@ frontend_dispatch_main(int fd, short event, void *bula) event_add(&iev_engine->ev, NULL); break; case IMSG_ICMP6SOCK: - if ((icmp6sock = imsg.fd) == -1) + if ((icmp6sock = imsg_get_fd(&imsg)) == -1) fatalx("%s: expected to receive imsg " "ICMPv6 fd but didn't receive any", __func__); @@ -343,7 +343,7 @@ frontend_dispatch_main(int fd, short event, void *bula) set_icmp6sock(icmp6sock, rdomain); break; case IMSG_ROUTESOCK: - if ((fd = imsg.fd) == -1) + if ((fd = imsg_get_fd(&imsg)) == -1) fatalx("%s: expected to receive imsg " "routesocket fd but didn't receive any", __func__); @@ -355,7 +355,7 @@ frontend_dispatch_main(int fd, short event, void *bula) break; #ifndef SMALL case IMSG_CONTROLFD: - if ((fd = imsg.fd) == -1) + if ((fd = imsg_get_fd(&imsg)) == -1) fatalx("%s: expected to receive imsg " "control fd but didn't receive any", __func__);