1
linux/net/sctp
Thomas Graf f8d9605243 sctp: Enforce retransmission limit during shutdown
When initiating a graceful shutdown while having data chunks
on the retransmission queue with a peer which is in zero
window mode the shutdown is never completed because the
retransmission error count is reset periodically by the
following two rules:

 - Do not timeout association while doing zero window probe.
 - Reset overall error count when a heartbeat request has
   been acknowledged.

The graceful shutdown will wait for all outstanding TSN to
be acknowledged before sending the SHUTDOWN request. This
never happens due to the peer's zero window not acknowledging
the continuously retransmitted data chunks. Although the
error counter is incremented for each failed retransmission,
the receiving of the SACK announcing the zero window clears
the error count again immediately. Also heartbeat requests
continue to be sent periodically. The peer acknowledges these
requests causing the error counter to be reset as well.

This patch changes behaviour to only reset the overall error
counter for the above rules while not in shutdown. After
reaching the maximum number of retransmission attempts, the
T5 shutdown guard timer is scheduled to give the receiver
some additional time to recover. The timer is stopped as soon
as the receiver acknowledges any data.

The issue can be easily reproduced by establishing a sctp
association over the loopback device, constantly queueing
data at the sender while not reading any at the receiver.
Wait for the window to reach zero, then initiate a shutdown
by killing both processes simultaneously. The association
will never be freed and the chunks on the retransmission
queue will be retransmitted indefinitely.

Signed-off-by: Thomas Graf <tgraf@infradead.org>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-07 14:08:44 -07:00
..
associola.c sctp: stop pending timers and purge queues when peer restart asoc 2011-05-31 15:29:17 -07:00
auth.c Fix common misspellings 2011-03-31 11:26:23 -03:00
bind_addr.c sctp: Fix build failure. 2011-05-21 02:10:23 -04:00
chunk.c net/sctp: Use pr_fmt and pr_<level> 2010-08-26 14:11:48 -07:00
command.c
debug.c sctp: remove completely unsed EMPTY state 2011-04-20 01:51:03 -07:00
endpointola.c sctp: bail from sctp_endpoint_lookup_assoc() if not bound 2011-04-20 01:51:03 -07:00
input.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
inqueue.c net/sctp: Use pr_fmt and pr_<level> 2010-08-26 14:11:48 -07:00
ipv6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-05-20 13:43:21 -07:00
Kconfig sctp: implement sctp association probing module 2010-04-30 22:41:09 -04:00
Makefile sctp: implement sctp association probing module 2010-04-30 22:41:09 -04:00
objcnt.c net/sctp: Use pr_fmt and pr_<level> 2010-08-26 14:11:48 -07:00
output.c Fix common misspellings 2011-03-31 11:26:23 -03:00
outqueue.c sctp: Enforce retransmission limit during shutdown 2011-07-07 14:08:44 -07:00
primitive.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
probe.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-10-23 11:47:02 -07:00
proc.c net: convert %p usage to %pK 2011-05-24 01:13:12 -04:00
protocol.c net: refine {udp|tcp|sctp}_mem limits 2011-07-07 00:27:05 -07:00
sm_make_chunk.c sctp: make heartbeat information in sctp_make_heartbeat() 2011-04-20 01:51:05 -07:00
sm_sideeffect.c sctp: Enforce retransmission limit during shutdown 2011-07-07 14:08:44 -07:00
sm_statefuns.c sctp: Enforce retransmission limit during shutdown 2011-07-07 14:08:44 -07:00
sm_statetable.c sctp: Enforce retransmission limit during shutdown 2011-07-07 14:08:44 -07:00
socket.c sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it 2011-07-07 04:10:26 -07:00
ssnmap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sysctl.c net: avoid limits overflow 2010-11-10 12:12:00 -08:00
transport.c sctp: Store a flowi in transports to provide persistent keying. 2011-05-08 14:05:14 -07:00
tsnmap.c sctp: fix compile warnings in sctp_tsnmap_num_gabs 2011-02-20 11:10:15 -08:00
ulpevent.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-05-20 13:43:21 -07:00
ulpqueue.c Fix common misspellings 2011-03-31 11:26:23 -03:00