Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp212629pxx; Wed, 28 Oct 2020 03:00:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIwcqHHWGMQX6hqyVW/rlNCAax/Hwu2+iHhJZWR4hWVBneYR1vemHtsYsOU0U7+7iKSYnI X-Received: by 2002:a05:6402:3045:: with SMTP id bu5mr7037140edb.232.1603879227380; Wed, 28 Oct 2020 03:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603879227; cv=none; d=google.com; s=arc-20160816; b=bmX+7MJC346tVuGF1wiP9JuezMm7N8uOAY/DnHsGWh0mDqj75kkP5HmUUobp8JE57n 1HSv1XEuYWpeM90OPUo0YhTFrUKIrj00yGEGdRs4DjqlbQBQNQ9Z7egu47QsYs4TGyDK q/YVJGVRxacsGqYwfdIPAxCyxb85qT47QxiTdIawtnWpG/7xjn/81azcYhSfV/5grkF/ cpxLlDwcx7kQITVJn/4X089jYzfMUNbEsoXJUe73mgPbhbxoLAkyu32U7tQjfKi3P3fO CImqc6vVx8VcYM51J6zPelj8jx9PJ98GRBKg62L0eCeW8yl710sLe/mBiOebLKVSBDaD EcEg== 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=zcA7iSRvISKiP9FBYZxfHTWUW+5MlTnj7woTt8GkfO0yhLHy6GAOGwIJxT+s/FNEDD FQDrF77/KON4/dCu7KgDGcusSrHJo7RuxgBIXWorDon1AqDAhK3q2u2OCbW2Uc7z6oIZ IR2pH7UWBrkF88HZ0iocO7n3lvOarFzSklw4cKOh3B8n6C+Zv793fLZaHtRsdkQwCeBL PuRqadnWLNSPbaTx6LxigeWDb5CWn+oqbZvxI4RrndCbWwMoCp810XLPJYFiCMzMDaW1 3n49xwuhR3l66LzfpVJYVR5k+qt8BdnEMcFnVpK0VUS6yDSeFIQiBs2OqMS2pqJzxtaU uQOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="URmnQB/S"; 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 y19si2789537ejd.730.2020.10.28.03.00.04; Wed, 28 Oct 2020 03:00:27 -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="URmnQB/S"; 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 S2437161AbgJ0Oa5 (ORCPT + 99 others); Tue, 27 Oct 2020 10:30:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:56624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2902112AbgJ0O34 (ORCPT ); Tue, 27 Oct 2020 10:29:56 -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 B69C120780; Tue, 27 Oct 2020 14:29:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808996; bh=ptos/kFt8+ZQBIpvrfHdAkl9k25O/e2wQYqrPNyGQ2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=URmnQB/SYyFycNAgl7aFHGG01E4tF4j9jEMaQGWGiGKXCg32fomb+utsCeVMNck4e HhPUESX2M4Y4z6GnzwxA7YjbID08VgHVDQ061s3lk/qXNScqIFYHGJeQAFbnO1YLpq teXLDDu3kzRMziHPgq9EnP9r2qEcV20yyftlMQc0= 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.4 037/408] selftests: forwarding: Add missing rp_filter configuration Date: Tue, 27 Oct 2020 14:49:35 +0100 Message-Id: <20201027135456.803232307@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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