diff options
Diffstat (limited to 'usr.sbin/eigrpd/eigrpd.c')
-rw-r--r-- | usr.sbin/eigrpd/eigrpd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/eigrpd/eigrpd.c b/usr.sbin/eigrpd/eigrpd.c index 03b2b99ca50..d9946bb9389 100644 --- a/usr.sbin/eigrpd/eigrpd.c +++ b/usr.sbin/eigrpd/eigrpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpd.c,v 1.35 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: eigrpd.c,v 1.36 2024/11/21 13:38:14 claudio Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -240,9 +240,13 @@ main(int argc, char *argv[]) if ((iev_eigrpe = malloc(sizeof(struct imsgev))) == NULL || (iev_rde = malloc(sizeof(struct imsgev))) == NULL) fatal(NULL); - imsgbuf_init(&iev_eigrpe->ibuf, pipe_parent2eigrpe[0]); + if (imsgbuf_init(&iev_eigrpe->ibuf, pipe_parent2eigrpe[0]) == -1) + fatal(NULL); + imsgbuf_allow_fdpass(&iev_eigrpe->ibuf); iev_eigrpe->handler = main_dispatch_eigrpe; - imsgbuf_init(&iev_rde->ibuf, pipe_parent2rde[0]); + if (imsgbuf_init(&iev_rde->ibuf, pipe_parent2rde[0]) == -1) + fatal(NULL); + imsgbuf_allow_fdpass(&iev_rde->ibuf); iev_rde->handler = main_dispatch_rde; /* setup event handler */ |