]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mptcp: always include dack if possible.
authorPaolo Abeni <pabeni@redhat.com>
Wed, 4 Mar 2020 15:51:07 +0000 (16:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Mar 2020 05:34:42 +0000 (21:34 -0800)
commit2398e3991bda7caa6b112a6f650fbab92f732b91
tree57236049c35a02f7a728e5aa499bbd33931c9528
parenta3aefbfe45751bf7b338c181b97608e276b5bb73
mptcp: always include dack if possible.

Currently passive MPTCP socket can skip including the DACK
option - if the peer sends data before accept() completes.

The above happens because the msk 'can_ack' flag is set
only after the accept() call.

Such missing DACK option may cause - as per RFC spec -
unwanted fallback to TCP.

This change addresses the issue using the key material
available in the current subflow, if any, to create a suitable
dack option when msk ack seq is not yet available.

v1 -> v2:
 - adavance the generated ack after the initial MPC packet

Fixes: d22f4988ffec ("mptcp: process MP_CAPABLE data option")
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>
net/mptcp/options.c