Subject: Re: [PATCH net-next 05/18] ipv4: Prepare fib_config for IPv6 gateway

From: Ido Schimmel <[email-masked]>
Date: Fri, 5 Apr 2019 13:38:52 +0000

On Thu, Apr 04, 2019 at 10:49:54AM -0700, David Ahern wrote:
> From: David Ahern <[email-masked]>
> 
> Similar to rtable, fib_config needs to allow the gateway to be either an
> IPv4 or an IPv6 address. To that end, rename fc_gw to fc_gw4 to mean an
> IPv4 address and add fc_gw_family. Check on 'is a gateway set' are changed

s/Check/Checks/

> to see if fc_gw_family is set. In the process prepare the code for a
> fc_gw_family == AF_INET6.
> 
> Signed-off-by: David Ahern <[email-masked]>

Reviewed-by: Ido Schimmel <[email-masked]>

See one note below

> ---
>  include/net/ip_fib.h     |  3 ++-
>  net/ipv4/fib_frontend.c  |  8 +++++---
>  net/ipv4/fib_semantics.c | 40 ++++++++++++++++++++++++++--------------
>  3 files changed, 33 insertions(+), 18 deletions(-)
> 
> diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
> index c68a40435ee0..8dee23ae9bde 100644
> --- a/include/net/ip_fib.h
> +++ b/include/net/ip_fib.h
> @@ -32,10 +32,11 @@ struct fib_config {
>  	u8			fc_protocol;
>  	u8			fc_scope;
>  	u8			fc_type;
> +	u8			fc_gw_family;
>  	/* 3 bytes unused */

Should be: /* 2 bytes unused */

>  	u32			fc_table;
>  	__be32			fc_dst;
> -	__be32			fc_gw;
> +	__be32			fc_gw4;
>  	int			fc_oif;
>  	u32			fc_flags;
>  	u32			fc_priority;