From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 539B4C76191 for ; Fri, 26 Jul 2019 15:37:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 248A622BEF for ; Fri, 26 Jul 2019 15:37:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564155477; bh=nJHAPEz7PBQj2xSNd6ewoV7vJODGIhZqEmBCv0hPUQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jNLyuJBH5eDAVdnUSd5SUY43XJI7r+NN/T++0sIPw5YzEXcWgSDUelyF7mATOZw16 tlZJnx9SA5cr3Mp3OWUryQUKMTwKvLR0vcfrgsyB5n2Cclk5nnBidgvMhFjKQCrEx/ rmI/PTd/98YPZyF5ZsSlaMm+lGJD+e4jEtTLLYeo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388745AbfGZP3P (ORCPT ); Fri, 26 Jul 2019 11:29:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:43892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388737AbfGZP3P (ORCPT ); Fri, 26 Jul 2019 11:29:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 46098218D4; Fri, 26 Jul 2019 15:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564154954; bh=nJHAPEz7PBQj2xSNd6ewoV7vJODGIhZqEmBCv0hPUQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kLTekQ7j3fezOq5boEjhESyacXCf+I6+giQ1a7RKKJdx4iv3UNePnjlGv0B3bJ6U/ nwXySCPxoUBGRwIskX4vuZBHNLCf6w8s0z2zCg1HZ630Ih/MJCmn2h8S4oGo4qJXIP 9aFnV87V9+Z4RQckkSws4zxpeoia1CcK1wPJIwG4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Donohue , David Ahern , "David S. Miller" Subject: [PATCH 5.1 06/62] ipv6: rt6_check should return NULL if from is NULL Date: Fri, 26 Jul 2019 17:24:18 +0200 Message-Id: <20190726152302.375382103@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190726152301.720139286@linuxfoundation.org> References: <20190726152301.720139286@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: David Ahern [ 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: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes") Reported-by: Paul Donohue Tested-by: Paul Donohue Signed-off-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2183,7 +2183,7 @@ static struct dst_entry *rt6_check(struc { 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;