]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/associola.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / net / sctp / associola.c
index 7b79d1e781a83460f8d9001cdb2eb8ab5089aa7f..d5cc731b6798aab16fa80a0a83a72932f37941fa 100644 (file)
@@ -1206,6 +1206,9 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
        struct list_head *head = &asoc->peer.transport_addr_list;
        struct list_head *pos;
 
+       if (asoc->peer.transport_count == 1)
+               return;
+
        /* Find the next transport in a round-robin fashion. */
        t = asoc->peer.retran_path;
        pos = &t->transports;
@@ -1220,6 +1223,15 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
 
                t = list_entry(pos, struct sctp_transport, transports);
 
+               /* We have exhausted the list, but didn't find any
+                * other active transports.  If so, use the next
+                * transport.
+                */
+               if (t == asoc->peer.retran_path) {
+                       t = next;
+                       break;
+               }
+
                /* Try to find an active transport. */
 
                if ((t->state == SCTP_ACTIVE) ||
@@ -1232,15 +1244,6 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
                        if (!next)
                                next = t;
                }
-
-               /* We have exhausted the list, but didn't find any
-                * other active transports.  If so, use the next
-                * transport.
-                */
-               if (t == asoc->peer.retran_path) {
-                       t = next;
-                       break;
-               }
        }
 
        asoc->peer.retran_path = t;