summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry_src.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-02-24 06:16:01 -0800
committerNeale Ranns <nranns@cisco.com>2017-02-24 16:37:23 +0000
commit08a70f177d340a40c2f3653124f0807fe1e69ebd (patch)
tree2f21345ac9b020abf046e40c8f82942b121b04ad /src/vnet/fib/fib_entry_src.c
parent26cd8c129567b48ed0e3610293251ca78fa67103 (diff)
FIB: 1) fix pool realloc during prefix export. 2) don't walk off the end of the path-extension vector
Change-Id: I8bd8f6917ace089edb1f65bd017b478ee198c03f Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_entry_src.c')
-rw-r--r--src/vnet/fib/fib_entry_src.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c
index 57109153b57..6f5b7fee485 100644
--- a/src/vnet/fib/fib_entry_src.c
+++ b/src/vnet/fib/fib_entry_src.c
@@ -266,6 +266,7 @@ fib_entry_src_collect_forwarding (fib_node_index_t pl_index,
{
fib_entry_src_collect_forwarding_ctx_t *ctx;
fib_path_ext_t *path_ext;
+ int have_path_ext;
ctx = arg;
@@ -285,14 +286,17 @@ fib_entry_src_collect_forwarding (fib_node_index_t pl_index,
/*
* get the matching path-extension for the path being visited.
*/
+ have_path_ext = 0;
vec_foreach(path_ext, ctx->esrc->fes_path_exts)
{
if (path_ext->fpe_path_index == path_index)
+ {
+ have_path_ext = 1;
break;
+ }
}
- if (NULL != path_ext &&
- path_ext->fpe_path_index == path_index &&
+ if (have_path_ext &&
fib_entry_src_valid_out_label(path_ext->fpe_label_stack[0]))
{
/*