Return-Path: Received: from mail-by2nam01on0103.outbound.protection.outlook.com ([104.47.34.103]:38992 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753890AbeARVAS (ORCPT ); Thu, 18 Jan 2018 16:00:18 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Julian Anastasov , "David S . Miller" , Sasha Levin Subject: [added to the 4.1 stable tree] ipv4: mask tos for input route Date: Thu, 18 Jan 2018 20:59:42 +0000 Message-ID: <20180118205908.3220-36-alexander.levin@microsoft.com> References: <20180118205908.3220-1-alexander.levin@microsoft.com> In-Reply-To: <20180118205908.3220-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Julian Anastasov This patch has been added to the stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ Upstream commit 6e28099d38c0e50d62c1afc054e37e573adf3d21 ] Restore the lost masking of TOS in input route code to allow ip rules to match it properly. Problem [1] noticed by Shmulik Ladkani [1] http://marc.info/?t=3D137331755300040&r=3D1&w=3D2 Fixes: 89aef8921bfb ("ipv4: Delete routing cache.") Signed-off-by: Julian Anastasov Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv4/route.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 6141fef3a64b..8f29e29f18a1 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1887,6 +1887,7 @@ int ip_route_input_noref(struct sk_buff *skb, __be32 = daddr, __be32 saddr, { int res; =20 + tos &=3D IPTOS_RT_MASK; rcu_read_lock(); =20 /* Multicast recognition logic is moved from route cache to here. --=20 2.11.0