Use imsg_get_fd() to access the file descriptor passed in the imsg.
authorclaudio <claudio@openbsd.org>
Thu, 14 Dec 2023 11:09:56 +0000 (11:09 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 14 Dec 2023 11:09:56 +0000 (11:09 +0000)
OK tb@

usr.sbin/eigrpd/eigrpe.c
usr.sbin/eigrpd/rde.c

index ad5495d..007ae62 100644 (file)
@@ -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 <renato@openbsd.org>
@@ -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;
index b14d967..383a3ee 100644 (file)
@@ -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 <renato@openbsd.org>
@@ -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;