X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fmpls%2Fmpls_api.c;h=8fec8e82e1e5f6f6388c2b554b6511a782e4d42b;hb=refs%2Fchanges%2F79%2F14579%2F2;hp=a35e94d3411da0f65fe2d75f9772ee4178bf9c8a;hpb=70fee2df339288d2c0a2a37ac8f497764df438c2;p=vpp.git diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c index a35e94d3411..8fec8e82e1e 100644 --- a/src/vnet/mpls/mpls_api.c +++ b/src/vnet/mpls/mpls_api.c @@ -306,6 +306,7 @@ vl_api_mpls_tunnel_add_del_t_handler (vl_api_mpls_tunnel_add_del_t * mp) u32 tunnel_sw_if_index; int ii; fib_route_path_t rpath, *rpaths = NULL; + u32 next_hop_via_label; memset (&rpath, 0, sizeof (rpath)); @@ -326,6 +327,14 @@ vl_api_mpls_tunnel_add_del_t_handler (vl_api_mpls_tunnel_add_del_t * mp) rpath.frp_sw_if_index = ntohl (mp->mt_next_hop_sw_if_index); rpath.frp_weight = 1; + next_hop_via_label = ntohl (mp->mt_next_hop_via_label); + if ((MPLS_LABEL_INVALID != next_hop_via_label) && (0 != next_hop_via_label)) + { + rpath.frp_proto = DPO_PROTO_MPLS; + rpath.frp_local_label = next_hop_via_label; + rpath.frp_eos = MPLS_NON_EOS; + } + if (mp->mt_is_add) { for (ii = 0; ii < mp->mt_next_hop_n_out_labels; ii++)