From 95e9ede396282ab1b4ae29437dca235ee1ccc02c Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 14 Dec 2023 11:09:56 +0000 Subject: [PATCH] Use imsg_get_fd() to access the file descriptor passed in the imsg. OK tb@ --- usr.sbin/eigrpd/eigrpe.c | 4 ++-- usr.sbin/eigrpd/rde.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/eigrpd/eigrpe.c b/usr.sbin/eigrpd/eigrpe.c index ad5495df994..007ae62697c 100644 --- a/usr.sbin/eigrpd/eigrpe.c +++ b/usr.sbin/eigrpd/eigrpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpe.c,v 1.40 2023/03/08 04:43:13 guenther Exp $ */ +/* $OpenBSD: eigrpe.c,v 1.41 2023/12/14 11:09:56 claudio Exp $ */ /* * Copyright (c) 2015 Renato Westphal @@ -289,7 +289,7 @@ eigrpe_dispatch_main(int fd, short event, void *bula) "to rde", __func__); break; } - if ((fd = imsg.fd) == -1) { + if ((fd = imsg_get_fd(&imsg)) == -1) { log_warnx("%s: expected to receive imsg fd to " "rde but didn't receive any", __func__); break; diff --git a/usr.sbin/eigrpd/rde.c b/usr.sbin/eigrpd/rde.c index b14d967ba2d..383a3ee57a2 100644 --- a/usr.sbin/eigrpd/rde.c +++ b/usr.sbin/eigrpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.25 2023/03/08 04:43:13 guenther Exp $ */ +/* $OpenBSD: rde.c,v 1.26 2023/12/14 11:09:56 claudio Exp $ */ /* * Copyright (c) 2015 Renato Westphal @@ -354,7 +354,7 @@ rde_dispatch_parent(int fd, short event, void *bula) "to eigrpe", __func__); break; } - if ((fd = imsg.fd) == -1) { + if ((fd = imsg_get_fd(&imsg)) == -1) { log_warnx("%s: expected to receive imsg fd to " "eigrpe but didn't receive any", __func__); break; -- 2.20.1