]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Check dest prefix length on original route not copied one in rt6_alloc_cow().
authorDavid S. Miller <davem@davemloft.net>
Tue, 13 Dec 2011 22:35:06 +0000 (17:35 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Dec 2011 22:35:06 +0000 (17:35 -0500)
commit3f7970a52822611e78110b41847b7c635e1c6b50
tree68d479f11721abaac0713792d096b98aa04b9854
parenta6947a0741b60bdc35c14d8a0a44c531cdb5acca
ipv6: Check dest prefix length on original route not copied one in rt6_alloc_cow().

After commit 931b0dd703ac4e314dd483f0bbe74db21461f592 ("ipv6: don't
use inetpeer to store metrics for routes.") the test in rt6_alloc_cow()
for setting the ANYCAST flag is now wrong.

'rt' will always now have a plen of 128, because it is set explicitly
to 128 by ip6_rt_copy.

So to restore the semantics of the test, check the destination prefix
length of 'ort'.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c