linux-stable/net/mptcp
Paolo Abeni bf6800a394 mptcp: fix checksum byte order
[ Upstream commit ba2c89e0ea ]

The MPTCP code typecasts the checksum value to u16 and
then converts it to big endian while storing the value into
the MPTCP option.

As a result, the wire encoding for little endian host is
wrong, and that causes interoperabilty interoperability
issues with other implementation or host with different endianness.

Address the issue writing in the packet the unmodified __sum16 value.

MPTCP checksum is disabled by default, interoperating with systems
with bad mptcp-level csum encoding should cause fallback to TCP.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/275
Fixes: c5b39e26d0 ("mptcp: send out checksum for DSS")
Fixes: 390b95a5fb ("mptcp: receive checksum for DSS")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:57:33 +02:00
..
crypto.c kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
crypto_test.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
ctrl.c mptcp: faster active backup recovery 2021-08-14 11:37:25 +01:00
diag.c mptcp: allow dumping subflow context to userspace 2020-03-29 22:14:48 -07:00
Kconfig kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
Makefile kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
mib.c mptcp: add mibs counter for ignored incoming options 2022-03-02 11:47:53 +01:00
mib.h mptcp: add mibs counter for ignored incoming options 2022-03-02 11:47:53 +01:00
mptcp_diag.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
options.c mptcp: fix checksum byte order 2022-05-25 09:57:33 +02:00
pm.c mptcp: add mibs counter for ignored incoming options 2022-03-02 11:47:53 +01:00
pm_netlink.c mptcp: fix race in incoming ADD_ADDR option processing 2022-03-02 11:47:52 +01:00
protocol.c mptcp: Correctly set DATA_FIN timeout when number of retransmits is large 2022-03-08 19:12:48 +01:00
protocol.h mptcp: fix checksum byte order 2022-05-25 09:57:33 +02:00
sockopt.c mptcp: remove tcp ulp setsockopt support 2021-12-22 09:32:43 +01:00
subflow.c mptcp: fix checksum byte order 2022-05-25 09:57:33 +02:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token_test.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00