* data structures for convenience.
*/
struct netlink_nh_info {
+ /* Weight of the nexthop ( for unequal cost ECMP ) */
+ uint8_t weight;
uint32_t if_index;
union g_addr *gateway;
nhi.recursive = nexthop->rparent ? 1 : 0;
nhi.type = nexthop->type;
nhi.if_index = nexthop->ifindex;
+ nhi.weight = nexthop->weight;
if (nexthop->type == NEXTHOP_TYPE_IPV4
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX) {
rtnh->rtnh_ifindex = nhi->if_index;
}
+ rtnh->rtnh_hops = nhi->weight;
+
encap = nhi->encap_info.encap_type;
switch (encap) {
case FPM_NH_ENCAP_NONE: