summaryrefslogtreecommitdiff
path: root/usr.sbin/rad
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2023-12-14 11:10:20 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2023-12-14 11:10:20 +0000
commite1ba33c5ceafbc400f3c86b405c0174b6b4f9f23 (patch)
treebf758873a65fe0eccf5d93ff6522913c15bc5136 /usr.sbin/rad
parentb729044d9409ccbbfc5cf44ec6bb4c8b118b21a2 (diff)
Use imsg_get_fd() to access the file descriptor passed in the imsg.
OK tb@
Diffstat (limited to 'usr.sbin/rad')
-rw-r--r--usr.sbin/rad/engine.c4
-rw-r--r--usr.sbin/rad/frontend.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/rad/engine.c b/usr.sbin/rad/engine.c
index ceb11d574e3..1205509d6ec 100644
--- a/usr.sbin/rad/engine.c
+++ b/usr.sbin/rad/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.21 2022/10/15 13:26:15 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.22 2023/12/14 11:09:34 claudio Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -304,7 +304,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/usr.sbin/rad/frontend.c b/usr.sbin/rad/frontend.c
index 66ebf0c8ff5..daeb49d05de 100644
--- a/usr.sbin/rad/frontend.c
+++ b/usr.sbin/rad/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.42 2022/12/28 21:30:18 jmc Exp $ */
+/* $OpenBSD: frontend.c,v 1.43 2023/12/14 11:09:34 claudio Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -339,7 +339,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
if (iev_engine)
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__);
@@ -465,7 +465,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
nconf = 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__);
@@ -479,7 +479,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
if (routesock != -1)
fatalx("%s: received unexpected routesock fd",
__func__);
- if ((routesock = imsg.fd) == -1)
+ if ((routesock = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg "
"routesocket fd but didn't receive any",
__func__);
@@ -490,7 +490,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
frontend_startup();
break;
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__);