aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/adj')
-rw-r--r--src/vnet/adj/adj_nbr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vnet/adj/adj_nbr.c b/src/vnet/adj/adj_nbr.c
index 2e0888b8c7c..4fb6d9263ae 100644
--- a/src/vnet/adj/adj_nbr.c
+++ b/src/vnet/adj/adj_nbr.c
@@ -521,12 +521,13 @@ typedef struct adj_db_count_ctx_t_ {
u64 count;
} adj_db_count_ctx_t;
-static void
+static int
adj_db_count (BVT(clib_bihash_kv) * kvp,
void *arg)
{
adj_db_count_ctx_t * ctx = arg;
ctx->count++;
+ return (BIHASH_WALK_CONTINUE);
}
u32
@@ -563,14 +564,16 @@ typedef struct adj_walk_ctx_t_
void *awc_ctx;
} adj_walk_ctx_t;
-static void
+static int
adj_nbr_walk_cb (BVT(clib_bihash_kv) * kvp,
void *arg)
{
adj_walk_ctx_t *ctx = arg;
// FIXME: can't stop early...
- ctx->awc_cb(kvp->value, ctx->awc_ctx);
+ if (ADJ_WALK_RC_STOP == ctx->awc_cb(kvp->value, ctx->awc_ctx))
+ return (BIHASH_WALK_STOP);
+ return (BIHASH_WALK_CONTINUE);
}
void