]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sctp: assure at least one T3-rtx timer is running if a FORWARD TSN is sent
authorWei Yongjun <yjwei@cn.fujitsu.com>
Sat, 1 May 2010 01:42:43 +0000 (21:42 -0400)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Sat, 1 May 2010 01:42:43 +0000 (21:42 -0400)
PR-SCTP extension section 3.5 Sender Side Implementation of PR-SCTP:
  C5) If a FORWARD TSN is sent, the sender MUST assure that at
      least one T3-rtx timer is running.

So this patch fix to assure at least one T3-rtx timer is running
if a FORWARD TSN is or will to sent.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
net/sctp/outqueue.c

index abfc0b8dee74ea171c9f974e7a10fe4b9c66b2b9..16d451a62b3fa3133aecbbf0808e746b64686dc5 100644 (file)
@@ -854,6 +854,12 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
                        if (status  != SCTP_XMIT_OK) {
                                /* put the chunk back */
                                list_add(&chunk->list, &q->control_chunk_list);
+                       } else if (chunk->chunk_hdr->type == SCTP_CID_FWD_TSN) {
+                               /* PR-SCTP C5) If a FORWARD TSN is sent, the
+                                * sender MUST assure that at least one T3-rtx
+                                * timer is running.
+                                */
+                               sctp_transport_reset_timers(transport, 0);
                        }
                        break;