continue;
api_nh = &api.nexthops[valid_nh_count];
- api_nh->vrf_id = bgp->vrf_id;
-
+ api_nh->vrf_id = nh_othervrf ? info->extra->bgp_orig->vrf_id
+ : bgp->vrf_id;
if (nh_family == AF_INET) {
struct in_addr *nexthop;
}
nexthop = &mpinfo_cp->attr->nexthop;
-
api_nh->gate.ipv4 = *nexthop;
- api_nh->vrf_id = nh_othervrf
- ? info->extra->bgp_orig->vrf_id
- : bgp->vrf_id;
+
/* EVPN type-2 routes are
programmed as onlink on l3-vni SVI
*/
api_nh->gate.ipv6 = *nexthop;
api_nh->ifindex = ifindex;
api_nh->type = NEXTHOP_TYPE_IPV6_IFINDEX;
- /* api_nh->vrf_id is not set for normal case? */
- if (nh_othervrf)
- api_nh->vrf_id = info->extra->bgp_orig->vrf_id;
}
if (mpinfo->extra