diff options
author | 2015-02-10 08:26:47 +0000 | |
---|---|---|
committer | 2015-02-10 08:26:47 +0000 | |
commit | f2c05001dfb41db7bafb101910b43ab8165a8b36 (patch) | |
tree | ddba1392eb28be47467257d17a68d0a2431a5b3a | |
parent | Sync kroute code with bgpd/ospfd code regarding EAGAIN and short reads (diff) | |
download | wireguard-openbsd-f2c05001dfb41db7bafb101910b43ab8165a8b36.tar.xz wireguard-openbsd-f2c05001dfb41db7bafb101910b43ab8165a8b36.zip |
Forgot the EAGAIN or EINTR check on read.
-rw-r--r-- | usr.sbin/ospfd/kroute.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c index 058ce700cb0..df0ba63242c 100644 --- a/usr.sbin/ospfd/kroute.c +++ b/usr.sbin/ospfd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.96 2015/02/10 05:24:48 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.97 2015/02/10 08:26:47 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -1307,6 +1307,8 @@ dispatch_rtmsg(void) ssize_t n; if ((n = read(kr_state.fd, &buf, sizeof(buf))) == -1) { + if (errno == EAGAIN || errno == EINTR) + return (0); log_warn("dispatch_rtmsg: read error"); return (-1); } |