summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-10-25 18:45:05 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-10-25 18:45:05 +0000
commit40cf96535fd7c0e186107005838ada9ac900f611 (patch)
treefebaeff6ea3c93757f97a036f46daf4a3427ecbe /usr.sbin
parent2ac90f519b05bdf41dca364317b1ebe32ef8fa11 (diff)
Only run the rib_dump_runner() if there is something pending and the
control socket has not many messages queued.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/rde.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index 99877446a73..0fcaacde545 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.341 2015/10/09 01:37:09 deraadt Exp $ */
+/* $OpenBSD: rde.c,v 1.342 2015/10/25 18:45:04 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -301,7 +301,8 @@ rde_main(int debug, int verbose)
rde_update_queue_runner();
for (aid = AID_INET6; aid < AID_MAX; aid++)
rde_update6_queue_runner(aid);
- if (ibuf_se_ctl && ibuf_se_ctl->w.queued <= 0)
+ if (rib_dump_pending() &&
+ ibuf_se_ctl && ibuf_se_ctl->w.queued <= 10)
rib_dump_runner();
}