]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/sctp/associola.c
sctp: Select a working primary during sctp_connectx()
[net-next-2.6.git] / net / sctp / associola.c
index 7eed77a39d0d149a518666ab509604f2c0ac9d4f..8e755ebff3b836f060296132cb2a6b850cab403d 100644 (file)
@@ -512,7 +512,13 @@ void sctp_assoc_set_primary(struct sctp_association *asoc,
         * to this destination address earlier. The sender MUST set
         * CYCLING_CHANGEOVER to indicate that this switch is a
         * double switch to the same destination address.
+        *
+        * Really, only bother is we have data queued or outstanding on
+        * the association.
         */
+       if (!asoc->outqueue.outstanding_bytes && !asoc->outqueue.out_qlen)
+               return;
+
        if (transport->cacc.changeover_active)
                transport->cacc.cycling_changeover = changeover;