diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-10-26 09:27:59 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-10-26 09:27:59 +0000 |
commit | ffe97cf2509441d71586f7007e9dcc611c880b76 (patch) | |
tree | 241662a53981ba9563d75ec5f9341b3710f70e47 /usr.sbin/bgpd/mrt.c | |
parent | cd9be4735772653114fdfd639a53fa4c0b876a16 (diff) |
Better error handling when doing mrt dumps (e.g. when there is no more space
on the disk). Before the SE spinned and the RDE may even crash in these events.
Found by Elisa Jasinska. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/mrt.c')
-rw-r--r-- | usr.sbin/bgpd/mrt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c index 932fa8d3392..da74d7af86f 100644 --- a/usr.sbin/bgpd/mrt.c +++ b/usr.sbin/bgpd/mrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mrt.c,v 1.64 2009/07/12 15:36:41 jsg Exp $ */ +/* $OpenBSD: mrt.c,v 1.65 2009/10/26 09:27:58 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -387,7 +387,7 @@ mrt_dump_upcall(struct rib_entry *re, void *ptr) } void -mrt_dump_done(void *ptr) +mrt_done(void *ptr) { struct mrt *mrtbuf = ptr; @@ -541,6 +541,7 @@ mrt_write(struct mrt *mrt) if ((r = buf_write(&mrt->wbuf)) < 0) { log_warn("mrt dump aborted, mrt_write"); mrt_clean(mrt); + mrt_done(mrt); } } |