X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fmpls%2Fmpls_api.c;h=9f5100a7f83fe77d39102a0b14107413fbce2100;hb=8145842bf273823192140c57fc773bb92d9db64f;hp=169ee406a9125857e2a94262c3b21b239d8a393f;hpb=eca834ed514ddb8a7b7f18dbbef2c637d7482bd3;p=vpp.git 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++; }