Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
a6562a2
)
FIB: pass a copy the walk context
16/17716/2
author
Neale Ranns
<
[email protected]
>
Thu, 14 Feb 2019 14:58:40 +0000
(14:58 +0000)
committer
Neale Ranns
<
[email protected]
>
Wed, 13 Mar 2019 12:26:36 +0000
(12:26 +0000)
since it can realloc when new ctx are added. If
not we can get some nasty memory corruption.
Change-Id: I617709c3013acbcb8aee07dc147894f0de896555
Signed-off-by: Neale Ranns <
[email protected]
>
(cherry picked from commit
58085f2f6757e464196b283cc8335ab5cf34a012
)
src/vnet/fib/fib_walk.c
patch
|
blob
|
history
diff --git
a/src/vnet/fib/fib_walk.c
b/src/vnet/fib/fib_walk.c
index
d094240
..
3fe586e
100644
(file)
--- a/
src/vnet/fib/fib_walk.c
+++ b/
src/vnet/fib/fib_walk.c
@@
-350,7
+350,9
@@
fib_walk_advance (fib_node_index_t fwi)
while (ii < n_ctxs)
{
- wrc = fib_node_back_walk_one(&sibling, &fwalk->fw_ctx[ii]);
+ fib_node_back_walk_ctx_t ctx = fwalk->fw_ctx[ii];
+
+ wrc = fib_node_back_walk_one(&sibling, &ctx);
ii++;
fwalk = fib_walk_get(fwi);