summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r--usr.sbin/ospfd/buffer.c8
-rw-r--r--usr.sbin/ospfd/packet.c5
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/ospfd/buffer.c b/usr.sbin/ospfd/buffer.c
index ad8f1e91067..f2a3ad54fa6 100644
--- a/usr.sbin/ospfd/buffer.c
+++ b/usr.sbin/ospfd/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.6 2005/04/26 15:18:22 henning Exp $ */
+/* $OpenBSD: buffer.c,v 1.7 2005/08/11 16:28:07 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -136,7 +136,8 @@ buf_write(int sock, struct buf *buf)
if ((n = write(sock, buf->buf + buf->rpos,
buf->size - buf->rpos)) == -1) {
- if (errno == EAGAIN || errno == ENOBUFS) /* try later */
+ if (errno == EAGAIN || errno == ENOBUFS ||
+ errno == EINTR) /* try later */
return (0);
else
return (-1);
@@ -215,7 +216,8 @@ msgbuf_write(struct msgbuf *msgbuf)
}
if ((n = sendmsg(msgbuf->fd, &msg, 0)) == -1) {
- if (errno == EAGAIN || errno == ENOBUFS) /* try later */
+ if (errno == EAGAIN || errno == ENOBUFS ||
+ errno == EINTR) /* try later */
return (0);
else
return (-1);
diff --git a/usr.sbin/ospfd/packet.c b/usr.sbin/ospfd/packet.c
index 714ad0e45ef..24b79074dda 100644
--- a/usr.sbin/ospfd/packet.c
+++ b/usr.sbin/ospfd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.10 2005/05/27 07:24:51 norby Exp $ */
+/* $OpenBSD: packet.c,v 1.11 2005/08/11 16:28:07 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -105,9 +105,8 @@ recv_packet(int fd, short event, void *bula)
fatal("recv_packet");
if ((r = recvfrom(fd, buf, READ_BUF_SIZE, 0, NULL, NULL)) == -1) {
- if (errno != EAGAIN) {
+ if (errno != EAGAIN && errno != EINTR)
log_debug("recv_packet: error receiving packet");
- }
goto done;
}