Skip to content

Commit

Permalink
mptcp: allow creating non-backup subflows
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Paolo Abeni authored and jenkins-tessares committed Aug 29, 2020
1 parent 50aba89 commit 808f42d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mptcp/subflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -1092,7 +1093,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);
Expand Down

0 comments on commit 808f42d

Please sign in to comment.