From b50ef4dc456178d6d0bc531936501f12f11c2ea8 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 31 May 2021 14:41:52 +0200 Subject: netns: make sure rp_filter is disabled on vethc Some distros may enable strict rp_filter by default, which will prevent vethc from receiving the packets with an unroutable reverse path address. Reported-by: Hangbin Liu Signed-off-by: Jason A. Donenfeld --- src/tests/netns.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/netns.sh b/src/tests/netns.sh index 756e494..5fa01f1 100755 --- a/src/tests/netns.sh +++ b/src/tests/netns.sh @@ -367,6 +367,7 @@ ip1 -6 rule add table main suppress_prefixlength 0 ip1 -4 route add default dev wg0 table 51820 ip1 -4 rule add not fwmark 51820 table 51820 ip1 -4 rule add table main suppress_prefixlength 0 +n1 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/vethc/rp_filter' # suppress_prefixlength only got added in 3.12, and we want to support 3.10+. if [[ $(ip1 -4 rule show all) == *suppress_prefixlength* ]]; then # Flood the pings instead of sending just one, to trigger routing table reference counting bugs. -- cgit v1.2.3