Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp246803pxx; Wed, 28 Oct 2020 04:01:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxovvUykIXi1id13Z+wK9J97dZAQ3PAflUTWLoVR844589Ef9oxtMRTeVilBcpedz9Py8N5 X-Received: by 2002:a17:906:329b:: with SMTP id 27mr1352565ejw.329.1603882912881; Wed, 28 Oct 2020 04:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603882912; cv=none; d=google.com; s=arc-20160816; b=uJdgso0ESKbpqN1n4GBgfN+iVVDwUbZO60VSuShJiWKycOK8b0l0/n8dHLMNMMJczU npnrTYxJNJhv0Bjakz0d8yWVB0sES9rV/2iuwQkfhjIKMCYuIsvJXxlqjUBlZujVLd1w KQR/ANpaEiqM8dDlWkWxhvcu6qJUho86IfQadxmyrNm+lSN+XaZbG/TNAQgoclv97VXt zomAUwQSZTGRRxKi1TBT9YQnW/XC+KGGk7mFlge7pKFDONp4fmsZzpk8NQw4/Rmjxzys YuZq2x87DVaG1n2f+r0nn+bIlnAXbIYEmp4IxabkCsFAUEADopkVqZOxkTKgZ7Yln1YJ b7pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=y56EQN5ppNJ/AB9Msyi8ZIbovESV46Cvyv1QFgYptTE=; b=TJtuW92ySBoFsUy5r58SyWmuGyxOVz70hFs86Ut77VzBU74rpwfVhIZF1YAd1Bruqv iunsfkdpUPi29tsMwzWu5rEqFEh4JnSak5Gm4BRgMiNRd3kYh0/nm+W9QCjzulkzv+BN bh92RjOW7u91YPiiyfDIKDA0rpcl07NAtpeYoadBTsBOEyorArnI6BNZ85Kpk8xuwfPT GeC4/irRqcO39lD4jQWuhkzPsj30QXSYbmLzU/elq9O7Ot6UuNz5ZO4whd6GiIxIerro UwWYyI5CmEvn+MvLDWQFkR7zotcI3HlyQhcQqDzPknLPkQbtgxuPd74LQxPIMbBdeTdM BD5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O0xwwjp3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si2705925ejr.482.2020.10.28.04.01.28; Wed, 28 Oct 2020 04:01:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O0xwwjp3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1783620AbgJ0O6b (ORCPT + 99 others); Tue, 27 Oct 2020 10:58:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:50626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1773105AbgJ0OvK (ORCPT ); Tue, 27 Oct 2020 10:51:10 -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 CC93A207DE; Tue, 27 Oct 2020 14:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810270; bh=ptos/kFt8+ZQBIpvrfHdAkl9k25O/e2wQYqrPNyGQ2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O0xwwjp31Q1LbN02bWepBU8Xz8uLTP02Hf0bikIfKUkFMoatEXjMeHzlkIRIG9DtX YW1MxOutI7Wa8qvrI5k7EUvYTVJ6dP7Xl8xV8u5Y54HyPjzzQWwH9i040DIuDkjGyF 0FdFUt/Cwkm53EFoicVtVqoDKUQZCoUWcJ/kSNZU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ido Schimmel , Hangbin Liu , Jakub Kicinski Subject: [PATCH 5.8 050/633] selftests: forwarding: Add missing rp_filter configuration Date: Tue, 27 Oct 2020 14:46:33 +0100 Message-Id: <20201027135525.046624396@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ido Schimmel [ Upstream commit 71a0e29e99405d89b695882d52eec60844173697 ] When 'rp_filter' is configured in strict mode (1) the tests fail because packets received from the macvlan netdevs would not be forwarded through them on the reverse path. Fix this by disabling the 'rp_filter', meaning no source validation is performed. Fixes: 1538812e0880 ("selftests: forwarding: Add a test for VXLAN asymmetric routing") Fixes: 438a4f5665b2 ("selftests: forwarding: Add a test for VXLAN symmetric routing") Signed-off-by: Ido Schimmel Reported-by: Hangbin Liu Tested-by: Hangbin Liu Link: https://lore.kernel.org/r/20201015084525.135121-1-idosch@idosch.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh | 10 ++++++++++ tools/testing/selftests/net/forwarding/vxlan_symmetric.sh | 10 ++++++++++ 2 files changed, 20 insertions(+) --- a/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh @@ -215,10 +215,16 @@ switch_create() bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 10 bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 20 + + sysctl_set net.ipv4.conf.all.rp_filter 0 + sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0 + sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0 } switch_destroy() { + sysctl_restore net.ipv4.conf.all.rp_filter + bridge fdb del 00:00:5e:00:01:01 dev br1 self local vlan 20 bridge fdb del 00:00:5e:00:01:01 dev br1 self local vlan 10 @@ -359,6 +365,10 @@ ns_switch_create() bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 10 bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 20 + + sysctl_set net.ipv4.conf.all.rp_filter 0 + sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0 + sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0 } export -f ns_switch_create --- a/tools/testing/selftests/net/forwarding/vxlan_symmetric.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_symmetric.sh @@ -237,10 +237,16 @@ switch_create() bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 10 bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 20 + + sysctl_set net.ipv4.conf.all.rp_filter 0 + sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0 + sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0 } switch_destroy() { + sysctl_restore net.ipv4.conf.all.rp_filter + bridge fdb del 00:00:5e:00:01:01 dev br1 self local vlan 20 bridge fdb del 00:00:5e:00:01:01 dev br1 self local vlan 10 @@ -402,6 +408,10 @@ ns_switch_create() bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 10 bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 20 + + sysctl_set net.ipv4.conf.all.rp_filter 0 + sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0 + sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0 } export -f ns_switch_create