Skip to content

Commit b50ef4d

Browse files
committed
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 <liuhangbin@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
1 parent e67b722 commit b50ef4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/tests/netns.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ ip1 -6 rule add table main suppress_prefixlength 0
367367
ip1 -4 route add default dev wg0 table 51820
368368
ip1 -4 rule add not fwmark 51820 table 51820
369369
ip1 -4 rule add table main suppress_prefixlength 0
370+
n1 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/vethc/rp_filter'
370371
# suppress_prefixlength only got added in 3.12, and we want to support 3.10+.
371372
if [[ $(ip1 -4 rule show all) == *suppress_prefixlength* ]]; then
372373
# Flood the pings instead of sending just one, to trigger routing table reference counting bugs.

0 commit comments

Comments
 (0)