summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuslan Babayev <ruslan@babayev.com>2020-02-02 17:30:31 -0800
committerNeale Ranns <nranns@cisco.com>2020-05-02 13:15:51 +0000
commit24b417c481bb2f33d80e8016f871df8ce62ab0bb (patch)
tree0b2e13401540df74d50841e2dda6e6de9dcdb98b
parent7f286f720d6fe2115423212dda6af66dd810691d (diff)
ip-neighbor: honor walk callback return value
Type: fix Change-Id: I5e1f7c37d612f4666edf2262b457ae0e13f20791 Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
-rw-r--r--src/vnet/ip-neighbor/ip_neighbor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/ip-neighbor/ip_neighbor.c b/src/vnet/ip-neighbor/ip_neighbor.c
index afb97acb39c..a0179f7f375 100644
--- a/src/vnet/ip-neighbor/ip_neighbor.c
+++ b/src/vnet/ip-neighbor/ip_neighbor.c
@@ -1047,7 +1047,8 @@ ip_neighbor_walk (ip46_type_t type,
/* *INDENT-OFF* */
hash_foreach (key, ipni, *hash,
({
- cb (ipni, ctx);
+ if (WALK_STOP == cb (ipni, ctx))
+ break;
}));
/* *INDENT-ON* */
}
@@ -1063,7 +1064,8 @@ ip_neighbor_walk (ip46_type_t type,
/* *INDENT-OFF* */
hash_foreach (key, ipni, hash,
({
- cb (ipni, ctx);
+ if (WALK_STOP == cb (ipni, ctx))
+ break;
}));
/* *INDENT-ON* */
}