On Fri, 26 Apr 2019, Florian Westphal wrote:
Otherwise, even loopback communication doesn't work
when program is run from non-init_netns.
Signed-off-by: Florian Westphal <fw(a)strlen.de>
---
Could be squashed with
'mptcp: Make connection_list a real list of subflows'.
Thanks Florian. I'll squash it earlier in the series, where the
sock_create_kern() call is added.
Mat
net/mptcp/protocol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 1e73e307a6d2..1fbddbcb1164 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -703,12 +703,12 @@ static struct proto mptcp_prot = {
static int mptcp_subflow_create(struct sock *sk)
{
struct mptcp_sock *msk = mptcp_sk(sk);
+ struct net *net = sock_net(sk);
struct socket *sf;
int err;
pr_debug("msk=%p", msk);
- err = sock_create_kern(&init_net, PF_INET, SOCK_STREAM, IPPROTO_TCP,
- &sf);
+ err = sock_create_kern(net, PF_INET, SOCK_STREAM, IPPROTO_TCP, &sf);
if (!err) {
lock_sock(sf->sk);
err = tcp_set_ulp(sf->sk, "mptcp");
--
2.21.0
--
Mat Martineau
Intel