]> git.itanic.dy.fi Git - linux-stable/commit
sctp: fix a type cast warnings that causes a_rwnd gets the wrong value
authorXin Long <lucien.xin@gmail.com>
Sat, 28 Oct 2017 11:43:56 +0000 (19:43 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 1 Jan 2018 20:52:00 +0000 (20:52 +0000)
commit5d730e88381931fffb8bad3c44871616b51f156a
tree323cf025013f2dc0cada4add3a53630e6a6f9405
parent9cf38522cd2be5ebd9ab046c452876ed2883b1d6
sctp: fix a type cast warnings that causes a_rwnd gets the wrong value

commit f6fc6bc0b8e0bb13a210bd7386ffdcb1a5f30ef1 upstream.

These warnings were found by running 'make C=2 M=net/sctp/'.

Commit d4d6fb5787a6 ("sctp: Try not to change a_rwnd when faking a
SACK from SHUTDOWN.") expected to use the peers old rwnd and add
our flight size to the a_rwnd. But with the wrong Endian, it may
not work as well as expected.

So fix it by converting to the right value.

Fixes: d4d6fb5787a6 ("sctp: Try not to change a_rwnd when faking a SACK from SHUTDOWN.")
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/sctp/sm_sideeffect.c