Commit 4596a2c1 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller

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: default avatarPaolo Abeni <pabeni@redhat.com>
Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ef0da3b8
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <net/ip6_route.h> #include <net/ip6_route.h>
#endif #endif
#include <net/mptcp.h> #include <net/mptcp.h>
#include <uapi/linux/mptcp.h>
#include "protocol.h" #include "protocol.h"
#include "mib.h" #include "mib.h"
...@@ -1090,7 +1091,7 @@ int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_addr_info *loc, ...@@ -1090,7 +1091,7 @@ int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_addr_info *loc,
subflow->remote_token = remote_token; subflow->remote_token = remote_token;
subflow->local_id = local_id; subflow->local_id = local_id;
subflow->request_join = 1; subflow->request_join = 1;
subflow->request_bkup = 1; subflow->request_bkup = !!(loc->flags & MPTCP_PM_ADDR_FLAG_BACKUP);
mptcp_info2sockaddr(remote, &addr); mptcp_info2sockaddr(remote, &addr);
err = kernel_connect(sf, (struct sockaddr *)&addr, addrlen, O_NONBLOCK); err = kernel_connect(sf, (struct sockaddr *)&addr, addrlen, O_NONBLOCK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment