Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bd84505 authored by David Ahern's avatar David Ahern Committed by Greg Kroah-Hartman
Browse files

ipv6: rt6_check should return NULL if 'from' is NULL



[ Upstream commit 49d05fe2c9d1b4a27761c9807fec39b8155bef9e ]

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: 93531c67 ("net/ipv6: separate handling of FIB entries from dst based routes")
Reported-by: default avatarPaul Donohue <linux-kernel@PaulSD.com>
Tested-by: default avatarPaul Donohue <linux-kernel@PaulSD.com>
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 47ce4427
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2214,7 +2214,7 @@ static struct dst_entry *rt6_check(struct rt6_info *rt,
{
{
	u32 rt_cookie = 0;
	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)
	    rt_cookie != cookie)
		return NULL;
		return NULL;