On 8/30/19 12:14 PM, Donald Sharp wrote: > diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h > index 4c81846ccce8..c7e94edae482 100644 > --- a/include/net/ip_fib.h > +++ b/include/net/ip_fib.h > @@ -513,7 +513,7 @@ int ip_valid_fib_dump_req(struct net *net, const struct > nlmsghdr *nlh, > struct netlink_callback *cb); > > int fib_nexthop_info(struct sk_buff *skb, const struct fib_nh_common *nh, > - unsigned char *flags, bool skip_oif); > + u8 family, unsigned char *flags, bool skip_oif); > int fib_add_nexthop(struct sk_buff *skb, const struct fib_nh_common *nh, > - int nh_weight); > + int nh_weight, u8 family);
Call this rt_family in both for 'route family' to make it clear. > #endif /* _NET_FIB_H */ > diff --git a/include/net/nexthop.h b/include/net/nexthop.h > index 95f766c31c90..f13c61806abf 100644 > --- a/include/net/nexthop.h > +++ b/include/net/nexthop.h > @@ -172,7 +172,7 @@ int nexthop_mpath_fill_node(struct sk_buff *skb, struct > nexthop *nh) nexthop_mpath_fill_node should take the family as input argument and then ... > struct fib_nh_common *nhc = &nhi->fib_nhc; > int weight = nhg->nh_entries[i].weight; > > - if (fib_add_nexthop(skb, nhc, weight) < 0) > + if (fib_add_nexthop(skb, nhc, weight, nhc->nhc_family) < 0) pass it to fib_add_nexthop. > return -EMSGSIZE; > } > The rest looks ok to me. as an FYI for the archives, the fib_nexthops.sh script does show the unexpected gw for IPv6 but it does not flag it as an error. I need to fix that so this should have been caught in the original submission.