]> git.baikalelectronics.ru Git - kernel.git/commit
net/ipv6: onlink nexthop checks should default to main table
authorDavid Ahern <dsahern@gmail.com>
Tue, 6 Feb 2018 21:17:06 +0000 (13:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Feb 2018 02:52:42 +0000 (21:52 -0500)
commitee20ecbdef28ea04c470c77a47665842dd1c20a8
tree81710df87a07ecdb2c5d47e4f774b8de36107e0a
parent73c4a4b73b4450d2eac85e030c5b51ad01b938e9
net/ipv6: onlink nexthop checks should default to main table

Because of differences in how ipv4 and ipv6 handle fib lookups,
verification of nexthops with onlink flag need to default to the main
table rather than the local table used by IPv4. As it stands an
address within a connected route on device 1 can be used with
onlink on device 2. Updating the table properly rejects the route
due to the egress device mismatch.

Update the extack message as well to show it could be a device
mismatch for the nexthop spec.

Fixes: bf366c3706a7 ("net/ipv6: Add support for onlink flag")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c