lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 Apr 2019 14:00:00 +0000
From:   Ido Schimmel <idosch@...lanox.com>
To:     David Ahern <dsahern@...nel.org>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jiri Pirko <jiri@...lanox.com>, David Ahern <dsahern@...il.com>
Subject: Re: [PATCH net-next 07/18] ipv4: Add support to fib_config for IPv6
 gateway

On Thu, Apr 04, 2019 at 10:49:56AM -0700, David Ahern wrote:
> From: David Ahern <dsahern@...il.com>
> 
> Add support for an IPv6 gateway to fib_config. Since a gateway is either
> IPv4 or IPv6, make it a union with fc_gw4 where fc_gw_family decides
> which address is in use. Update current checks on family and gw4 to
> handle ipv6 as well.
> 
> Signed-off-by: David Ahern <dsahern@...il.com>

Reviewed-by: Ido Schimmel <idosch@...lanox.com>

See one note below

> -		     fi->fib_nh->fib_nh_gw4 != cfg->fc_gw4)) {
> +		     fi->fib_nh->fib_nh_gw4 != cfg->fc_gw4) ||
> +		    (cfg->fc_gw_family == AF_INET6 &&
> +		     ipv6_addr_cmp(&fi->fib_nh->fib_nh_gw6, &cfg->fc_gw6))) {
>  			NL_SET_ERR_MSG(extack,
>  				       "Nexthop gateway does not match RTA_GATEWAY");

Given that you can now specify a gateway with either RTA_GATEWAY or
RTA_VIA it might make sense to adjust this message.

>  			goto errout;
> @@ -745,6 +758,10 @@ int fib_nh_match(struct fib_config *cfg, struct fib_info *fi,
>  		    cfg->fc_gw4 != fi->fib_nh->fib_nh_gw4)
>  			return 1;
>  
> +		if (cfg->fc_gw_family == AF_INET6 &&
> +		    ipv6_addr_cmp(&cfg->fc_gw6, &fi->fib_nh->fib_nh_gw6))
> +			return 1;
> +
>  		return 0;
>  	}
>  
> -- 
> 2.11.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ