summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/mrt.c7
-rw-r--r--usr.sbin/bgpd/rde.c5
2 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c
index cf4af51efff..e8cd8be4a56 100644
--- a/usr.sbin/bgpd/mrt.c
+++ b/usr.sbin/bgpd/mrt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mrt.c,v 1.56 2009/03/13 06:25:04 claudio Exp $ */
+/* $OpenBSD: mrt.c,v 1.57 2009/03/18 19:45:09 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -600,7 +600,7 @@ int
mrt_open(struct mrt *mrt, time_t now)
{
enum imsg_type type;
- int i, fd;
+ int i = 1, fd;
if (strftime(MRT2MC(mrt)->file, sizeof(MRT2MC(mrt)->file),
MRT2MC(mrt)->name, localtime(&now)) == 0) {
@@ -620,7 +620,8 @@ mrt_open(struct mrt *mrt, time_t now)
else
type = IMSG_MRT_REOPEN;
- i = mrt->type == MRT_TABLE_DUMP ? 0 : 1;
+ if (mrt->type == MRT_TABLE_DUMP || mrt->type == MRT_TABLE_DUMP_MP)
+ i = 0;
if (imsg_compose(mrt_imsgbuf[i], type, 0, 0, fd,
mrt, sizeof(struct mrt)) == -1)
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index adceec9657d..93d63f19644 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.239 2009/03/13 16:05:40 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.240 2009/03/18 19:45:09 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -700,7 +700,8 @@ rde_dispatch_imsg_parent(struct imsgbuf *ibuf)
if ((xmrt->wbuf.fd = imsg_get_fd(ibuf)) == -1)
log_warnx("expected to receive fd for mrt dump "
"but didn't receive any");
- else if (xmrt->type == MRT_TABLE_DUMP) {
+ else if (xmrt->type == MRT_TABLE_DUMP ||
+ xmrt->type == MRT_TABLE_DUMP_MP) {
/* do not dump if another is still running */
if (mrt == NULL || mrt->wbuf.queued == 0) {
free(mrt);