diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-03-18 19:45:10 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-03-18 19:45:10 +0000 |
commit | 04177707b084ac317daa35e28e219d4ef9ac8d56 (patch) | |
tree | 63c88be26a7191910bdd2804a012f612b7de7cb1 /usr.sbin/bgpd/mrt.c | |
parent | 22585be56620390cf56bc0b4e0afb83c85699166 (diff) |
Correctly check for MRT_TABLE_DUMP_MP and don't send the config to the SE.
Make mrt table-mp dumps actually work. Found on the plane from NRT to ZRH.
OK henning@
Diffstat (limited to 'usr.sbin/bgpd/mrt.c')
-rw-r--r-- | usr.sbin/bgpd/mrt.c | 7 |
1 files changed, 4 insertions, 3 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) |