diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-14 10:56:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-14 10:56:40 -0400 |
commit | 6a7ebdf2fd15417e87b4fd02ff411aeaca34da5f (patch) | |
tree | 86b15d8cd3e25c97b348b5a61bdb16c02726a480 /net/sctp/outqueue.c | |
parent | f6b72b6217f8c24f2a54988e58af858b4e66024d (diff) | |
parent | 51414d41084496aaefd06d7f19eb8206e8bfac2d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/bluetooth/l2cap_core.c
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index edc753297a49..a6d27bf563a5 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -1595,6 +1595,8 @@ static void sctp_check_transmitted(struct sctp_outq *q, | |||
1595 | #endif /* SCTP_DEBUG */ | 1595 | #endif /* SCTP_DEBUG */ |
1596 | if (transport) { | 1596 | if (transport) { |
1597 | if (bytes_acked) { | 1597 | if (bytes_acked) { |
1598 | struct sctp_association *asoc = transport->asoc; | ||
1599 | |||
1598 | /* We may have counted DATA that was migrated | 1600 | /* We may have counted DATA that was migrated |
1599 | * to this transport due to DEL-IP operation. | 1601 | * to this transport due to DEL-IP operation. |
1600 | * Subtract those bytes, since the were never | 1602 | * Subtract those bytes, since the were never |
@@ -1613,6 +1615,17 @@ static void sctp_check_transmitted(struct sctp_outq *q, | |||
1613 | transport->error_count = 0; | 1615 | transport->error_count = 0; |
1614 | transport->asoc->overall_error_count = 0; | 1616 | transport->asoc->overall_error_count = 0; |
1615 | 1617 | ||
1618 | /* | ||
1619 | * While in SHUTDOWN PENDING, we may have started | ||
1620 | * the T5 shutdown guard timer after reaching the | ||
1621 | * retransmission limit. Stop that timer as soon | ||
1622 | * as the receiver acknowledged any data. | ||
1623 | */ | ||
1624 | if (asoc->state == SCTP_STATE_SHUTDOWN_PENDING && | ||
1625 | del_timer(&asoc->timers | ||
1626 | [SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD])) | ||
1627 | sctp_association_put(asoc); | ||
1628 | |||
1616 | /* Mark the destination transport address as | 1629 | /* Mark the destination transport address as |
1617 | * active if it is not so marked. | 1630 | * active if it is not so marked. |
1618 | */ | 1631 | */ |
@@ -1642,10 +1655,15 @@ static void sctp_check_transmitted(struct sctp_outq *q, | |||
1642 | * A sender is doing zero window probing when the | 1655 | * A sender is doing zero window probing when the |
1643 | * receiver's advertised window is zero, and there is | 1656 | * receiver's advertised window is zero, and there is |
1644 | * only one data chunk in flight to the receiver. | 1657 | * only one data chunk in flight to the receiver. |
1658 | * | ||
1659 | * Allow the association to timeout while in SHUTDOWN | ||
1660 | * PENDING or SHUTDOWN RECEIVED in case the receiver | ||
1661 | * stays in zero window mode forever. | ||
1645 | */ | 1662 | */ |
1646 | if (!q->asoc->peer.rwnd && | 1663 | if (!q->asoc->peer.rwnd && |
1647 | !list_empty(&tlist) && | 1664 | !list_empty(&tlist) && |
1648 | (sack_ctsn+2 == q->asoc->next_tsn)) { | 1665 | (sack_ctsn+2 == q->asoc->next_tsn) && |
1666 | q->asoc->state < SCTP_STATE_SHUTDOWN_PENDING) { | ||
1649 | SCTP_DEBUG_PRINTK("%s: SACK received for zero " | 1667 | SCTP_DEBUG_PRINTK("%s: SACK received for zero " |
1650 | "window probe: %u\n", | 1668 | "window probe: %u\n", |
1651 | __func__, sack_ctsn); | 1669 | __func__, sack_ctsn); |