[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4cecf207-775c-6b40-8152-66880de2be58@gmail.com>
Date: Tue, 3 Sep 2019 16:17:10 -0600
From: David Ahern <dsahern@...il.com>
To: Donald Sharp <sharpd@...ulusnetworks.com>, netdev@...r.kernel.org,
dsahern@...nel.org, sworley@...ulusnetworks.com
Subject: Re: [PATCH v2 net] net: Properly update v4 routes with v6 nexthop
On 8/31/19 6:22 AM, Donald Sharp wrote:
> @@ -1684,7 +1684,8 @@ EXPORT_SYMBOL_GPL(fib_add_nexthop);
> #endif
>
> #ifdef CONFIG_IP_ROUTE_MULTIPATH
> -static int fib_add_multipath(struct sk_buff *skb, struct fib_info *fi)
> +static int fib_add_multipath(struct sk_buff *skb, struct fib_info *fi,
> + u8 rt_family)
The fib_info argument makes this an IPv4 only function, so the rt_family
is extraneous. Remove it here and the #else path below and use AF_INET
for the 2 calls below.
> {
> struct nlattr *mp;
>
> @@ -1693,13 +1694,14 @@ static int fib_add_multipath(struct sk_buff *skb, struct fib_info *fi)
> goto nla_put_failure;
>
> if (unlikely(fi->nh)) {
> - if (nexthop_mpath_fill_node(skb, fi->nh) < 0)
> + if (nexthop_mpath_fill_node(skb, fi->nh, rt_family) < 0)
> goto nla_put_failure;
> goto mp_end;
> }
>
> for_nexthops(fi) {
> - if (fib_add_nexthop(skb, &nh->nh_common, nh->fib_nh_weight) < 0)
> + if (fib_add_nexthop(skb, &nh->nh_common, nh->fib_nh_weight,
> + rt_family) < 0)
> goto nla_put_failure;
> #ifdef CONFIG_IP_ROUTE_CLASSID
> if (nh->nh_tclassid &&
> @@ -1717,7 +1719,8 @@ static int fib_add_multipath(struct sk_buff *skb, struct fib_info *fi)
> return -EMSGSIZE;
> }
> #else
> -static int fib_add_multipath(struct sk_buff *skb, struct fib_info *fi)
> +static int fib_add_multipath(struct sk_buff *skb, struct fib_info *fi,
> + u8 family)
> {
> return 0;
> }
Powered by blists - more mailing lists