summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-08-11 09:37:12 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-08-11 09:37:12 +0000
commitaacb1735c1ed8bf77cfe7d13b35c3485138b1924 (patch)
tree28d0875468f6520a2157565327268021b1c66a20 /usr.sbin
parent0fed13f91b350edb3cc67186089ced2182d38cc7 (diff)
buf_write() returns -1 on error and -2 on connection closed. Treat both
as errors for mrt dumps.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/mrt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c
index a7cef305646..d7b5800249b 100644
--- a/usr.sbin/bgpd/mrt.c
+++ b/usr.sbin/bgpd/mrt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mrt.c,v 1.41 2004/08/10 13:50:10 claudio Exp $ */
+/* $OpenBSD: mrt.c,v 1.42 2004/08/11 09:37:11 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -371,7 +371,7 @@ mrt_write(struct mrt *mrt)
mrt->queued--;
buf_free(b);
}
- if (r == -1) {
+ if (r <= -1) {
log_warn("mrt dump write");
mrt_clean(mrt);
return (-1);