summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-06-01 22:54:03 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-06-01 22:54:03 +0000
commit66c29c8aaa9bd842aae524dd24125940522ed538 (patch)
tree33c96b7f8bf18fd5ae3e9f278849f1b45eed10ac /usr.sbin/bgpd
parent727752470aa35d6ccfa98b69a7a52731c952f5da (diff)
Do not call the upcall twice on some prefixes. Move the upcall back to
where it was beforhands.
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde_rib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index 80d4ab293c2..630307d585a 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.105 2009/06/01 22:49:06 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.106 2009/06/01 22:54:02 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -231,7 +231,6 @@ rib_dump_r(struct rib_context *ctx)
for (i = 0; re != NULL; re = RB_NEXT(rib_tree, unused, re)) {
if (ctx->ctx_af != AF_UNSPEC && ctx->ctx_af != re->prefix->af)
continue;
- ctx->ctx_upcall(re, ctx->ctx_arg);
if (ctx->ctx_count && i++ >= ctx->ctx_count &&
(re->flags & F_RIB_ENTRYLOCK) == 0) {
/* store and lock last element */
@@ -239,6 +238,7 @@ rib_dump_r(struct rib_context *ctx)
re->flags |= F_RIB_ENTRYLOCK;
return;
}
+ ctx->ctx_upcall(re, ctx->ctx_arg);
}
LIST_REMOVE(ctx, entry);