diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
commit | 65b53e4cc90e59936733b3b95b9451d2ca47528d (patch) | |
tree | 29932718192962671c48c3fd1ea017a6112459e8 /net/sctp/associola.c | |
parent | 788c0a53164c05c5ccdb1472474372b72ba74644 (diff) | |
parent | 2e761e0532a784816e7e822dbaaece8c5d4be14d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/ieee80211_i.h
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 7b79d1e781a8..d5cc731b6798 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -1206,6 +1206,9 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc) | |||
1206 | struct list_head *head = &asoc->peer.transport_addr_list; | 1206 | struct list_head *head = &asoc->peer.transport_addr_list; |
1207 | struct list_head *pos; | 1207 | struct list_head *pos; |
1208 | 1208 | ||
1209 | if (asoc->peer.transport_count == 1) | ||
1210 | return; | ||
1211 | |||
1209 | /* Find the next transport in a round-robin fashion. */ | 1212 | /* Find the next transport in a round-robin fashion. */ |
1210 | t = asoc->peer.retran_path; | 1213 | t = asoc->peer.retran_path; |
1211 | pos = &t->transports; | 1214 | pos = &t->transports; |
@@ -1220,6 +1223,15 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc) | |||
1220 | 1223 | ||
1221 | t = list_entry(pos, struct sctp_transport, transports); | 1224 | t = list_entry(pos, struct sctp_transport, transports); |
1222 | 1225 | ||
1226 | /* We have exhausted the list, but didn't find any | ||
1227 | * other active transports. If so, use the next | ||
1228 | * transport. | ||
1229 | */ | ||
1230 | if (t == asoc->peer.retran_path) { | ||
1231 | t = next; | ||
1232 | break; | ||
1233 | } | ||
1234 | |||
1223 | /* Try to find an active transport. */ | 1235 | /* Try to find an active transport. */ |
1224 | 1236 | ||
1225 | if ((t->state == SCTP_ACTIVE) || | 1237 | if ((t->state == SCTP_ACTIVE) || |
@@ -1232,15 +1244,6 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc) | |||
1232 | if (!next) | 1244 | if (!next) |
1233 | next = t; | 1245 | next = t; |
1234 | } | 1246 | } |
1235 | |||
1236 | /* We have exhausted the list, but didn't find any | ||
1237 | * other active transports. If so, use the next | ||
1238 | * transport. | ||
1239 | */ | ||
1240 | if (t == asoc->peer.retran_path) { | ||
1241 | t = next; | ||
1242 | break; | ||
1243 | } | ||
1244 | } | 1247 | } |
1245 | 1248 | ||
1246 | asoc->peer.retran_path = t; | 1249 | asoc->peer.retran_path = t; |