diff options
author | 2009-06-01 22:54:02 +0000 | |
---|---|---|
committer | 2009-06-01 22:54:02 +0000 | |
commit | c923412a75d113884d5ccb9e32e7e58868feb46f (patch) | |
tree | 8e52c58e0dc067915604b03b1f094608b01c9322 | |
parent | Add a tab to blank line so hack(6) knows to print a blank line (diff) | |
download | wireguard-openbsd-c923412a75d113884d5ccb9e32e7e58868feb46f.tar.xz wireguard-openbsd-c923412a75d113884d5ccb9e32e7e58868feb46f.zip |
Do not call the upcall twice on some prefixes. Move the upcall back to
where it was beforhands.
-rw-r--r-- | usr.sbin/bgpd/rde_rib.c | 4 |
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); |