summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-10-14 10:21:31 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-10-14 10:21:31 +0000
commit2aa01cadbef9b58ca38d2d55528079404ad47dbc (patch)
tree082684892f8ed3bf0736c8bd3f764c9fdc473cbe /usr.sbin/bgpd
parentec745864fe884fa5b18ad29bdaed9154aa97dc1e (diff)
Unbreak mrt table dumps. Make sure to call rib_dump_r for the mrt dump
context once every poll loop until finished or data is queued. OK benno@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index 51a55aed302..80a6131a00f 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.433 2018/10/03 11:36:39 denis Exp $ */
+/* $OpenBSD: rde.c,v 1.434 2018/10/14 10:21:30 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -282,6 +282,11 @@ rde_main(int debug, int verbose)
i = PFD_PIPE_COUNT;
for (mctx = LIST_FIRST(&rde_mrts); mctx != 0; mctx = xmctx) {
xmctx = LIST_NEXT(mctx, entry);
+
+ if (mctx->mrt.state != MRT_STATE_REMOVE &&
+ mctx->mrt.wbuf.queued == 0)
+ rib_dump_r(&mctx->ribctx);
+
if (mctx->mrt.wbuf.queued) {
pfd[i].fd = mctx->mrt.wbuf.fd;
pfd[i].events = POLLOUT;