Skip to content

Commit 0290abc

Browse files
liuhangbinkuba-moo
authored andcommitted
wireguard: selftests: load nf_conntrack if not present
Some distros may not load nf_conntrack by default, which will cause subsequent nf_conntrack sets to fail. Load this module if it is not already loaded. Fixes: e7096c1 ("net: WireGuard secure network tunnel") Signed-off-by: Hangbin Liu <[email protected]> Reviewed-by: Simon Horman <[email protected]> [ Jason: add [[ -e ... ]] check so this works in the qemu harness. ] Signed-off-by: Jason A. Donenfeld <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c1822fb commit 0290abc

File tree

1 file changed

+1
-0
lines changed
  • tools/testing/selftests/wireguard

1 file changed

+1
-0
lines changed

tools/testing/selftests/wireguard/netns.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ waitiface $netns1 vethc
332332
waitiface $netns2 veths
333333

334334
n0 bash -c 'printf 1 > /proc/sys/net/ipv4/ip_forward'
335+
[[ -e /proc/sys/net/netfilter/nf_conntrack_udp_timeout ]] || modprobe nf_conntrack
335336
n0 bash -c 'printf 2 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout'
336337
n0 bash -c 'printf 2 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout_stream'
337338
n0 iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 10.0.0.0/24 -j SNAT --to 10.0.0.1

0 commit comments

Comments
 (0)