diff mbox series

selftests: mptcp: turn rp_filter off on every NIC

Message ID 1623219771-40982-1-git-send-email-liyonglong@chinatelecom.cn (mailing list archive)
State Superseded, archived
Delegated to: Mat Martineau
Headers show
Series selftests: mptcp: turn rp_filter off on every NIC | expand

Commit Message

YonglongLi June 9, 2021, 6:22 a.m. UTC
To turn rp_filter off we should:
echo 0 > /proc/sys/net/ipv4/conf/<device>/rp_filter
 and
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter

Signed-off-by: Yonglong Li <liyonglong@chinatelecom.cn>
---
 tools/testing/selftests/net/mptcp/simult_flows.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mat Martineau June 10, 2021, 12:29 a.m. UTC | #1
On Wed, 9 Jun 2021, Yonglong Li wrote:

> To turn rp_filter off we should:
> echo 0 > /proc/sys/net/ipv4/conf/<device>/rp_filter
> and
> echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
>
> Signed-off-by: Yonglong Li <liyonglong@chinatelecom.cn>
> ---
> tools/testing/selftests/net/mptcp/simult_flows.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
> index 3aeef3b..a29ffef 100755
> --- a/tools/testing/selftests/net/mptcp/simult_flows.sh
> +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
> @@ -81,6 +81,8 @@ setup()
> 	ip netns exec "$ns1" ./pm_nl_ctl limits 1 1
> 	ip netns exec "$ns1" ./pm_nl_ctl add 10.0.2.1 dev ns1eth2 flags subflow
> 	ip netns exec "$ns1" sysctl -q net.ipv4.conf.all.rp_filter=0
> +	ip netns exec "$ns1" sysctl -q net.ipv4.conf.ns1eth1.rp_filter=0
> +	ip netns exec "$ns1" sysctl -q net.ipv4.conf.ns1eth2.rp_filter=0
>
> 	ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1
> 	ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 nodad
> -- 
> 1.8.3.1
>
>

Would it make sense to set net.ipv4.conf.all.rp_filter=0 and 
net.ipv4.conf.default.rp_filter=0 at line 63 (in the loop that runs 'ip 
netns add') like mptcp_join.sh and mptcp_connect.sh do?

--
Mat Martineau
Intel
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
index 3aeef3b..a29ffef 100755
--- a/tools/testing/selftests/net/mptcp/simult_flows.sh
+++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
@@ -81,6 +81,8 @@  setup()
 	ip netns exec "$ns1" ./pm_nl_ctl limits 1 1
 	ip netns exec "$ns1" ./pm_nl_ctl add 10.0.2.1 dev ns1eth2 flags subflow
 	ip netns exec "$ns1" sysctl -q net.ipv4.conf.all.rp_filter=0
+	ip netns exec "$ns1" sysctl -q net.ipv4.conf.ns1eth1.rp_filter=0
+	ip netns exec "$ns1" sysctl -q net.ipv4.conf.ns1eth2.rp_filter=0
 
 	ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1
 	ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 nodad