aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/mpls')
-rw-r--r--src/vnet/mpls/mpls_api.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index 169ee406a91..9f5100a7f83 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -427,12 +427,7 @@ send_mpls_tunnel_entry (u32 mti, void *arg)
fp = mp->mt_paths;
vec_foreach (api_rpath, api_rpaths)
{
- memset (fp, 0, sizeof (*fp));
-
- fp->weight = api_rpath->rpath.frp_weight;
- fp->preference = api_rpath->rpath.frp_preference;
- fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
- copy_fib_next_hop (api_rpath, fp);
+ fib_api_path_encode (api_rpath, fp);
fp++;
}
@@ -491,11 +486,7 @@ send_mpls_fib_details (vpe_api_main_t * am,
fp = mp->path;
vec_foreach (api_rpath, api_rpaths)
{
- memset (fp, 0, sizeof (*fp));
- fp->weight = api_rpath->rpath.frp_weight;
- fp->preference = api_rpath->rpath.frp_preference;
- fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
- copy_fib_next_hop (api_rpath, fp);
+ fib_api_path_encode (api_rpath, fp);
fp++;
}