From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com
Cc: Hangbin Liu <liuhangbin@gmail.com>,
Simon Horman <horms@kernel.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH net-next 3/4] wireguard: selftests: load nf_conntrack if not present
Date: Sun, 17 Nov 2024 22:20:29 +0100 [thread overview]
Message-ID: <20241117212030.629159-4-Jason@zx2c4.com> (raw)
In-Reply-To: <20241117212030.629159-1-Jason@zx2c4.com>
From: Hangbin Liu <liuhangbin@gmail.com>
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: e7096c131e51 ("net: WireGuard secure network tunnel")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
[ Jason: add [[ -e ... ]] check so this works in the qemu harness. ]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
tools/testing/selftests/wireguard/netns.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/wireguard/netns.sh b/tools/testing/selftests/wireguard/netns.sh
index 405ff262ca93..55500f901fbc 100755
--- a/tools/testing/selftests/wireguard/netns.sh
+++ b/tools/testing/selftests/wireguard/netns.sh
@@ -332,6 +332,7 @@ waitiface $netns1 vethc
waitiface $netns2 veths
n0 bash -c 'printf 1 > /proc/sys/net/ipv4/ip_forward'
+[[ -e /proc/sys/net/netfilter/nf_conntrack_udp_timeout ]] || modprobe nf_conntrack
n0 bash -c 'printf 2 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout'
n0 bash -c 'printf 2 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout_stream'
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
--
2.46.0
next prev parent reply other threads:[~2024-11-17 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 21:20 [PATCH net-next 0/4] wireguard updates and fixes for 6.13 Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 1/4] wireguard: device: omit unnecessary memset of netdev private data Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 2/4] wireguard: allowedips: remove redundant selftest call Jason A. Donenfeld
2024-11-17 21:20 ` Jason A. Donenfeld [this message]
2024-11-17 21:20 ` [PATCH net-next 4/4] wireguard: device: support big tcp GSO Jason A. Donenfeld
2024-11-19 4:00 ` [PATCH net-next 0/4] wireguard updates and fixes for 6.13 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241117212030.629159-4-Jason@zx2c4.com \
--to=jason@zx2c4.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).