sctp: HEARTBEAT negotiation after ASCONF
authorMichio Honda <micchie@sfc.wide.ad.jp>
Thu, 16 Jun 2011 01:54:23 +0000 (10:54 +0900)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Aug 2011 02:41:09 +0000 (19:41 -0700)
This patch fixes BUG that the ASCONF receiver transmits DATA chunks
to the newly added UNCONFIRMED destination.

Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/outqueue.c

index a6d27bf563a5a70b23f8a6615c849f909bc4bb3d..14c2b06028ffb1bea3acde6243ff9386d053616e 100644 (file)
@@ -917,6 +917,8 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
                 * current cwnd).
                 */
                if (!list_empty(&q->retransmit)) {
+                       if (asoc->peer.retran_path->state == SCTP_UNCONFIRMED)
+                               goto sctp_flush_out;
                        if (transport == asoc->peer.retran_path)
                                goto retran;
 
@@ -989,6 +991,8 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
                            ((new_transport->state == SCTP_INACTIVE) ||
                             (new_transport->state == SCTP_UNCONFIRMED)))
                                new_transport = asoc->peer.active_path;
+                       if (new_transport->state == SCTP_UNCONFIRMED)
+                               continue;
 
                        /* Change packets if necessary.  */
                        if (new_transport != transport) {