[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6acec7e5-fafc-c78e-ffea-07861087a469@gmail.com>
Date: Fri, 2 Mar 2018 16:39:48 -0700
From: David Ahern <dsahern@...il.com>
To: netdev@...r.kernel.org
Cc: idosch@...sch.org, David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next] net/ipv6: Address checks need to consider the L3
domain
On 3/2/18 4:09 PM, David Ahern wrote:
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index f0ae58424c45..792e7432ba6d 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -2820,9 +2820,9 @@ static struct rt6_info *ip6_route_info_create(struct fib6_config *cfg,
> * prefix route was assigned to, which might be non-loopback.
> */
> err = -EINVAL;
> - if (ipv6_chk_addr_and_flags(net, gw_addr,
> + if (ipv6_chk_addr_and_flags(net, gw_addr, dev,
> gwa_type & IPV6_ADDR_LINKLOCAL ?
> - dev : NULL, 0, 0)) {
> + false : true, 0, 0)) {
> NL_SET_ERR_MSG(extack, "Invalid gateway address");
> goto out;
> }
Of course I find this right after sending the patch ....
The route add needs another check to see if it is a local address.
Please drop this one; will send a v2 next week.
Powered by blists - more mailing lists