Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97671
b: refs/heads/master
c: 4141ddc
h: refs/heads/master
i:
  97669: ec772e2
  97667: 5be8da7
  97663: 1c219dd
v: v3
  • Loading branch information
Gui Jianfeng authored and David S. Miller committed Jun 4, 2008
1 parent 2bd2872 commit f695020
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aed5a833fb18123d7cfc6ce3810ab97efd4869b3
refs/heads/master: 4141ddc02a92a6e3e5793601554c6033e83c25b9
21 changes: 12 additions & 9 deletions trunk/net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,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;
Expand All @@ -1217,6 +1220,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) ||
Expand All @@ -1229,15 +1241,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;
Expand Down

0 comments on commit f695020

Please sign in to comment.