Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] mptcp: Fix checksum byte order on little-endian
@ 2022-05-17 18:02 Mat Martineau
  2022-05-17 18:02 ` [PATCH net 1/2] mptcp: fix checksum byte order Mat Martineau
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mat Martineau @ 2022-05-17 18:02 UTC (permalink / raw)
  To: netdev; +Cc: Mat Martineau, davem, kuba, pabeni, edumazet, matthieu.baerts,
	mptcp

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
-- 
2.36.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-18 12:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-17 18:02 [PATCH net 0/2] mptcp: Fix checksum byte order on little-endian Mat Martineau
2022-05-17 18:02 ` [PATCH net 1/2] mptcp: fix checksum byte order Mat Martineau
2022-05-17 18:02 ` [PATCH net 2/2] mptcp: Do TCP fallback on early DSS checksum failure Mat Martineau
2022-05-18 12:30 ` [PATCH net 0/2] mptcp: Fix checksum byte order on little-endian patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox