Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fib: fib api updates
[vpp.git]
/
src
/
vnet
/
mpls
/
mpls_tunnel.c
diff --git
a/src/vnet/mpls/mpls_tunnel.c
b/src/vnet/mpls/mpls_tunnel.c
index
8db08c3
..
b7bcbfd
100644
(file)
--- a/
src/vnet/mpls/mpls_tunnel.c
+++ b/
src/vnet/mpls/mpls_tunnel.c
@@
-242,7
+242,7
@@
mpls_tunnel_stack (adj_index_t ai)
mt = mpls_tunnel_get_from_sw_if_index(sw_if_index);
mt = mpls_tunnel_get_from_sw_if_index(sw_if_index);
- if (NULL == mt)
+ if (NULL == mt
|| FIB_NODE_INDEX_INVALID == mt->mt_path_list
)
return;
if (FIB_NODE_INDEX_INVALID == mt->mt_path_list)
return;
if (FIB_NODE_INDEX_INVALID == mt->mt_path_list)
@@
-654,6
+654,7
@@
void
vnet_mpls_tunnel_path_add (u32 sw_if_index,
fib_route_path_t *rpaths)
{
vnet_mpls_tunnel_path_add (u32 sw_if_index,
fib_route_path_t *rpaths)
{
+ fib_route_path_t *rpath;
mpls_tunnel_t *mt;
u32 mti;
mpls_tunnel_t *mt;
u32 mti;
@@
-695,10
+696,13
@@
vnet_mpls_tunnel_path_add (u32 sw_if_index,
*/
fib_path_ext_list_resolve(&mt->mt_path_exts, mt->mt_path_list);
}
*/
fib_path_ext_list_resolve(&mt->mt_path_exts, mt->mt_path_list);
}
- fib_path_ext_list_insert(&mt->mt_path_exts,
- mt->mt_path_list,
- FIB_PATH_EXT_MPLS,
- rpaths);
+ vec_foreach(rpath, rpaths)
+ {
+ fib_path_ext_list_insert(&mt->mt_path_exts,
+ mt->mt_path_list,
+ FIB_PATH_EXT_MPLS,
+ rpath);
+ }
mpls_tunnel_restack(mt);
}
mpls_tunnel_restack(mt);
}