mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ipv6: rt6_check should return NULL if 'from' is NULL
[ Upstream commit49d05fe2c9] Paul reported that l2tp sessions were broken after the commit referenced in the Fixes tag. Prior to this commit rt6_check returned NULL if the rt6_info 'from' was NULL - ie., the dst_entry was disconnected from a FIB entry. Restore that behavior. Fixes:93531c6743("net/ipv6: separate handling of FIB entries from dst based routes") Reported-by: Paul Donohue <linux-kernel@PaulSD.com> Tested-by: Paul Donohue <linux-kernel@PaulSD.com> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
47ce442783
commit
0bd84505f1
@@ -2214,7 +2214,7 @@ static struct dst_entry *rt6_check(struct rt6_info *rt,
|
||||
{
|
||||
u32 rt_cookie = 0;
|
||||
|
||||
if ((from && !fib6_get_cookie_safe(from, &rt_cookie)) ||
|
||||
if (!from || !fib6_get_cookie_safe(from, &rt_cookie) ||
|
||||
rt_cookie != cookie)
|
||||
return NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user