On 3/2/18 4:09 PM, David Ahern wrote:
quoted hunk ↗ jump to hunk
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.