diff options
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/control.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 493d2249c57..9d92a18ca36 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.271 2024/11/21 13:10:26 claudio Exp $ */ +/* $OpenBSD: bgpd.c,v 1.272 2024/11/21 13:16:06 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1273,7 +1273,7 @@ handle_pollfd(struct pollfd *pfd, struct imsgbuf *i) return (0); if (pfd->revents & POLLOUT) - if (imsg_write(i) <= 0 && errno != EAGAIN) { + if (imsg_write(i) == -1) { log_warn("imsg write error"); close(i->fd); i->fd = -1; diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index 2fc6c04273a..5bd1464cd98 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.122 2024/11/21 13:10:26 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.123 2024/11/21 13:16:06 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -249,7 +249,7 @@ control_dispatch_msg(struct pollfd *pfd, struct peer_head *peers) } if (pfd->revents & POLLOUT) { - if (imsg_write(&c->imsgbuf) <= 0 && errno != EAGAIN) + if (imsg_write(&c->imsgbuf) == -1) return control_close(c); if (c->throttled && c->imsgbuf.w.queued < CTL_MSG_LOW_MARK) { if (imsg_ctl_rde_msg(IMSG_XON, 0, c->imsgbuf.pid) != -1) |