android_kernel_google_msm/include/net/sctp
lucien 8a26248a33 sctp: start t5 timer only when peer rwnd is 0 and local state is SHUTDOWN_PENDING
commit 8a0d19c5ed417c78d03f4e0fa7215e58c40896d8 upstream.

when A sends a data to B, then A close() and enter into SHUTDOWN_PENDING
state, if B neither claim his rwnd is 0 nor send SACK for this data, A
will keep retransmitting this data until t5 timeout, Max.Retrans times
can't work anymore, which is bad.

if B's rwnd is not 0, it should send abort after Max.Retrans times, only
when B's rwnd == 0 and A's retransmitting beyonds Max.Retrans times, A
will start t5 timer, which is also commit f8d9605243 ("sctp: Enforce
retransmission limit during shutdown") means, but it lacks the condition
peer rwnd == 0.

so fix it by adding a bit (zero_window_announced) in peer to record if
the last rwnd is 0. If it was, zero_window_announced will be set. and use
this bit to decide if start t5 timer when local.state is SHUTDOWN_PENDING.

Fixes: commit f8d9605243 ("sctp: Enforce retransmission limit during shutdown")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: change sack_needed to bitfield as done earlier upstream]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2016-10-26 23:15:35 +08:00
..
auth.h
checksum.h sctp: Clean up sctp checksumming code 2009-02-16 00:03:10 -08:00
command.h sctp: deal with multiple COOKIE_ECHO chunks 2011-09-16 17:17:22 -04:00
constants.h sctp: remove completely unsed EMPTY state 2011-04-20 01:51:03 -07:00
sctp.h net: sctp: fix panic on duplicate ASCONF chunks 2015-04-14 17:33:57 +08:00
sm.h net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks 2015-04-14 17:33:57 +08:00
structs.h sctp: start t5 timer only when peer rwnd is 0 and local state is SHUTDOWN_PENDING 2016-10-26 23:15:35 +08:00
tsnmap.h net: return operator cleanup 2010-09-23 14:33:39 -07:00
ulpevent.h sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing socket 2011-07-08 09:53:08 -07:00
ulpqueue.h
user.h sctp: Add socket option operation for Auto-ASCONF. 2011-06-02 02:04:53 -07:00