From patchwork Tue Sep 1 15:09:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 264713 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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 EDCD8C433E7 for ; Tue, 1 Sep 2020 15:42:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3EEC20866 for ; Tue, 1 Sep 2020 15:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598974927; bh=suhF0qwwSU0yECNHcaKgTLO11nlKyMh0NmEMGkWs6+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MMdne3lwbLCe0+2hC88E7bWlJams7a4QGud2yF/USSJF9kysWA3QOOgW6eybD1E+B MreVAhe8z42gNt/+ZiD222rgFI8v/tFtO6kUJFm2s2afpiyZJnohKE3j5Ou4pmPVnH atMULJYZvtyhgbkv98ZQXTYYpXmC6D8xfBEyXj8c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731472AbgIAPmG (ORCPT ); Tue, 1 Sep 2020 11:42:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:54650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728203AbgIAPmF (ORCPT ); Tue, 1 Sep 2020 11:42:05 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 6723120E65; Tue, 1 Sep 2020 15:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598974924; bh=suhF0qwwSU0yECNHcaKgTLO11nlKyMh0NmEMGkWs6+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QI6Sq8Mj0YMTL1YneTKO6ajddY0QZO27QE97lq7a+x4kwXHFgbNeVRjnW/+u/IR6r hwNRfPhYyMn7Kvar2vAY3QRPLHtgohEmuCeqGhLQsyqbrQL5MFqzaCXDOFBCZUNzXq Zo5856WvoozOJ3kSPq0tRXOSb+LRMs43ZeNCNgWo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Ahern , "David S. Miller" , Sasha Levin Subject: [PATCH 5.8 142/255] selftests: disable rp_filter for icmp_redirect.sh Date: Tue, 1 Sep 2020 17:09:58 +0200 Message-Id: <20200901151007.508384008@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200901151000.800754757@linuxfoundation.org> References: <20200901151000.800754757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: David Ahern [ Upstream commit bcf7ddb0186d366f761f86196b480ea6dd2dc18c ] h1 is initially configured to reach h2 via r1 rather than the more direct path through r2. If rp_filter is set and inherited for r2, forwarding fails since the source address of h1 is reachable from eth0 vs the packet coming to it via r1 and eth1. Since rp_filter setting affects the test, explicitly reset it. Signed-off-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- tools/testing/selftests/net/icmp_redirect.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/icmp_redirect.sh b/tools/testing/selftests/net/icmp_redirect.sh index 18c5de53558af..bf361f30d6ef9 100755 --- a/tools/testing/selftests/net/icmp_redirect.sh +++ b/tools/testing/selftests/net/icmp_redirect.sh @@ -180,6 +180,8 @@ setup() ;; r[12]) ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1 ip netns exec $ns sysctl -q -w net.ipv4.conf.all.send_redirects=1 + ip netns exec $ns sysctl -q -w net.ipv4.conf.default.rp_filter=0 + ip netns exec $ns sysctl -q -w net.ipv4.conf.all.rp_filter=0 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1 ip netns exec $ns sysctl -q -w net.ipv6.route.mtu_expires=10