netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Donald Sharp <sharpd@cumulusnetworks.com>,
	netdev@vger.kernel.org, dsahern@kernel.org,
	sworley@cumulusnetworks.com
Subject: Re: [PATCH net] net: Properly update v4 routes with v6 nexthop
Date: Fri, 30 Aug 2019 19:48:03 -0600	[thread overview]
Message-ID: <c4b2e04e-295a-a8c4-138e-8b9dd5606cde@gmail.com> (raw)
In-Reply-To: <20190830181446.25262-1-sharpd@cumulusnetworks.com>

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.

      reply	other threads:[~2019-08-31  1:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 18:14 [PATCH net] net: Properly update v4 routes with v6 nexthop Donald Sharp
2019-08-31  1:48 ` David Ahern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4b2e04e-295a-a8c4-138e-8b9dd5606cde@gmail.com \
    --to=dsahern@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sharpd@cumulusnetworks.com \
    --cc=sworley@cumulusnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).