Skip to content

Commit 4596a2c

Browse files
Paolo Abenidavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ef0da3b commit 4596a2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mptcp/subflow.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <net/ip6_route.h>
2121
#endif
2222
#include <net/mptcp.h>
23+
#include <uapi/linux/mptcp.h>
2324
#include "protocol.h"
2425
#include "mib.h"
2526

@@ -1090,7 +1091,7 @@ int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_addr_info *loc,
10901091
subflow->remote_token = remote_token;
10911092
subflow->local_id = local_id;
10921093
subflow->request_join = 1;
1093-
subflow->request_bkup = 1;
1094+
subflow->request_bkup = !!(loc->flags & MPTCP_PM_ADDR_FLAG_BACKUP);
10941095
mptcp_info2sockaddr(remote, &addr);
10951096

10961097
err = kernel_connect(sf, (struct sockaddr *)&addr, addrlen, O_NONBLOCK);

0 commit comments

Comments
 (0)