summaryrefslogtreecommitdiff
path: root/net/mptcp
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2020-09-14 10:01:16 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-14 13:28:02 -0700
commit4596a2c1b7f55b8dac9ef4d8724cbef6e11eb74c (patch)
treec00354cf2ebd05255763b92f6756aed7fb6837fb /net/mptcp
parentef0da3b8a2f18f59ea310ce27696c431eeb57eab (diff)
downloadlwn-4596a2c1b7f55b8dac9ef4d8724cbef6e11eb74c.tar.gz
lwn-4596a2c1b7f55b8dac9ef4d8724cbef6e11eb74c.zip
mptcp: allow creating non-backup subflows
Currently the 'backup' attribute of local endpoint is ignored. Let's use it for the MP_JOIN handshake Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
-rw-r--r--net/mptcp/subflow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index ae3eeb9bb191..8be401349d9f 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -20,6 +20,7 @@
#include <net/ip6_route.h>
#endif
#include <net/mptcp.h>
+#include <uapi/linux/mptcp.h>
#include "protocol.h"
#include "mib.h"
@@ -1090,7 +1091,7 @@ int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_addr_info *loc,
subflow->remote_token = remote_token;
subflow->local_id = local_id;
subflow->request_join = 1;
- subflow->request_bkup = 1;
+ subflow->request_bkup = !!(loc->flags & MPTCP_PM_ADDR_FLAG_BACKUP);
mptcp_info2sockaddr(remote, &addr);
err = kernel_connect(sf, (struct sockaddr *)&addr, addrlen, O_NONBLOCK);