mbox series

[net,0/2] mptcp: Fix checksum byte order on little-endian

Message ID 20220517180212.92597-1-mathew.j.martineau@linux.intel.com (mailing list archive)
Headers show
Series mptcp: Fix checksum byte order on little-endian | expand

Message

Mat Martineau May 17, 2022, 6:02 p.m. UTC
These patches address a bug in the byte ordering of MPTCP checksums on
little-endian architectures. The __sum16 type is always big endian, but
was being cast to u16 and then byte-swapped (on little-endian archs)
when reading/writing the checksum field in MPTCP option headers.

MPTCP checksums are off by default, but are enabled if one or both peers
request it in the SYN/SYNACK handshake.

The corrected code is verified to interoperate between big-endian and
little-endian machines.

Patch 1 fixes the checksum byte order, patch 2 partially mitigates
interoperation with peers sending bad checksums by falling back to TCP
instead of resetting the connection.

Mat Martineau (1):
  mptcp: Do TCP fallback on early DSS checksum failure

Paolo Abeni (1):
  mptcp: fix checksum byte order

 net/mptcp/options.c  | 36 ++++++++++++++++++++++++------------
 net/mptcp/protocol.h |  5 +++--
 net/mptcp/subflow.c  | 23 +++++++++++++++++++----
 3 files changed, 46 insertions(+), 18 deletions(-)


base-commit: edf410cb74dc612fd47ef5be319c5a0bcd6e6ccd

Comments

patchwork-bot+netdevbpf@kernel.org May 18, 2022, 12:30 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 17 May 2022 11:02:10 -0700 you wrote:
> These patches address a bug in the byte ordering of MPTCP checksums on
> little-endian architectures. The __sum16 type is always big endian, but
> was being cast to u16 and then byte-swapped (on little-endian archs)
> when reading/writing the checksum field in MPTCP option headers.
> 
> MPTCP checksums are off by default, but are enabled if one or both peers
> request it in the SYN/SYNACK handshake.
> 
> [...]

Here is the summary with links:
  - [net,1/2] mptcp: fix checksum byte order
    https://git.kernel.org/netdev/net/c/ba2c89e0ea74
  - [net,2/2] mptcp: Do TCP fallback on early DSS checksum failure
    https://git.kernel.org/netdev/net/c/ae66fb2ba6c3

You are awesome, thank you!