Skip to content

Commit

Permalink
wireguard: selftests: make sure rp_filter is disabled on vethc
Browse files Browse the repository at this point in the history
Some distros may enable strict rp_filter by default, which will prevent
vethc from receiving the packets with an unrouteable reverse path address.

Reported-by: Hangbin Liu <[email protected]>
Fixes: e7096c1 ("net: WireGuard secure network tunnel")
Cc: [email protected]
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
zx2c4 authored and davem330 committed Jun 4, 2021
1 parent acf2492 commit f8873d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/wireguard/netns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,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'
# Flood the pings instead of sending just one, to trigger routing table reference counting bugs.
n1 ping -W 1 -c 100 -f 192.168.99.7
n1 ping -W 1 -c 100 -f abab::1111
Expand Down

0 comments on commit f8873d1

Please sign in to comment.