diff options
Diffstat (limited to 'src/vnet/ip/ip_api.c')
-rw-r--r-- | src/vnet/ip/ip_api.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 69ff719f3b9..b4d942b6bef 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -1208,13 +1208,15 @@ mroute_add_del_handler (u8 is_add, dpo_proto_t nh_proto, u32 entry_flags, fib_rpf_id_t rpf_id, - u32 next_hop_sw_if_index, u32 itf_flags, u32 bier_imp) + u32 next_hop_sw_if_index, + ip46_address_t * nh, u32 itf_flags, u32 bier_imp) { stats_dslock_with_hint (1 /* release hint */ , 2 /* tag */ ); fib_route_path_t path = { .frp_sw_if_index = next_hop_sw_if_index, .frp_proto = nh_proto, + .frp_addr = *nh, }; if (is_local) @@ -1253,6 +1255,7 @@ api_mroute_add_del_t_handler (vl_api_ip_mroute_add_del_t * mp) { fib_protocol_t fproto; dpo_proto_t nh_proto; + ip46_address_t nh; u32 fib_index; int rv; @@ -1277,6 +1280,8 @@ api_mroute_add_del_t_handler (vl_api_ip_mroute_add_del_t * mp) sizeof (pfx.fp_grp_addr.ip4)); clib_memcpy (&pfx.fp_src_addr.ip4, mp->src_address, sizeof (pfx.fp_src_addr.ip4)); + memset (&nh.ip6, 0, sizeof (nh.ip6)); + clib_memcpy (&nh.ip4, mp->nh_address, sizeof (nh.ip4)); } else { @@ -1284,6 +1289,7 @@ api_mroute_add_del_t_handler (vl_api_ip_mroute_add_del_t * mp) sizeof (pfx.fp_grp_addr.ip6)); clib_memcpy (&pfx.fp_src_addr.ip6, mp->src_address, sizeof (pfx.fp_src_addr.ip6)); + clib_memcpy (&nh.ip6, mp->nh_address, sizeof (nh.ip6)); } return (mroute_add_del_handler (mp->is_add, @@ -1293,6 +1299,7 @@ api_mroute_add_del_t_handler (vl_api_ip_mroute_add_del_t * mp) ntohl (mp->entry_flags), ntohl (mp->rpf_id), ntohl (mp->next_hop_sw_if_index), + &nh, ntohl (mp->itf_flags), ntohl (mp->bier_imp))); } |