Thread (2 messages) 2 messages, 1 author, 2018-03-02

Re: [PATCH net-next] net/ipv6: Address checks need to consider the L3 domain

flat view

From: David Ahern <hidden>
Date: 2018-03-02 23:39:52

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help