From: Ruslan Babayev Date: Mon, 3 Feb 2020 01:30:31 +0000 (-0800) Subject: ip-neighbor: honor walk callback return value X-Git-Tag: v20.09-rc0~75 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=24b417c481bb2f33d80e8016f871df8ce62ab0bb;p=vpp.git ip-neighbor: honor walk callback return value Type: fix Change-Id: I5e1f7c37d612f4666edf2262b457ae0e13f20791 Signed-off-by: Ruslan Babayev --- 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* */ }