]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: fix checksum byte order
authorPaolo Abeni <pabeni@redhat.com>
Tue, 17 May 2022 18:02:11 +0000 (11:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 May 2022 12:05:42 +0000 (13:05 +0100)
commit5716ae3801b367da94deac3da7a0112c78770b4d
treecadd2fd0217592f637fa105a35e847eea3539989
parent123044eae107d6347326f381deb33a2ccf1e6662
mptcp: fix checksum byte order

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: 939a8166ad8d ("mptcp: send out checksum for DSS")
Fixes: 7fe09189ef30 ("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>
net/mptcp/options.c
net/mptcp/protocol.h
net/mptcp/subflow.c