diff options
author | James Morris <james.l.morris@oracle.com> | 2014-11-19 05:32:12 -0500 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-11-19 05:32:12 -0500 |
commit | b10778a00d40b3d9fdaaf5891e802794781ff71c (patch) | |
tree | 6ba4cbac86eecedc3f30650e7f764ecf00c83898 /net/sctp/associola.c | |
parent | 594081ee7145cc30a3977cb4e218f81213b63dc5 (diff) | |
parent | bfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff) |
Merge commit 'v3.17' into next
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 06a9ee6b2d3a..a88b8524846e 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -813,6 +813,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc, | |||
813 | else { | 813 | else { |
814 | dst_release(transport->dst); | 814 | dst_release(transport->dst); |
815 | transport->dst = NULL; | 815 | transport->dst = NULL; |
816 | ulp_notify = false; | ||
816 | } | 817 | } |
817 | 818 | ||
818 | spc_state = SCTP_ADDR_UNREACHABLE; | 819 | spc_state = SCTP_ADDR_UNREACHABLE; |
@@ -1244,7 +1245,7 @@ static struct sctp_transport *sctp_trans_elect_best(struct sctp_transport *curr, | |||
1244 | { | 1245 | { |
1245 | u8 score_curr, score_best; | 1246 | u8 score_curr, score_best; |
1246 | 1247 | ||
1247 | if (best == NULL) | 1248 | if (best == NULL || curr == best) |
1248 | return curr; | 1249 | return curr; |
1249 | 1250 | ||
1250 | score_curr = sctp_trans_score(curr); | 1251 | score_curr = sctp_trans_score(curr); |
@@ -1355,14 +1356,11 @@ static void sctp_select_active_and_retran_path(struct sctp_association *asoc) | |||
1355 | trans_sec = trans_pri; | 1356 | trans_sec = trans_pri; |
1356 | 1357 | ||
1357 | /* If we failed to find a usable transport, just camp on the | 1358 | /* If we failed to find a usable transport, just camp on the |
1358 | * primary or retran, even if they are inactive, if possible | 1359 | * active or pick a PF iff it's the better choice. |
1359 | * pick a PF iff it's the better choice. | ||
1360 | */ | 1360 | */ |
1361 | if (trans_pri == NULL) { | 1361 | if (trans_pri == NULL) { |
1362 | trans_pri = sctp_trans_elect_best(asoc->peer.primary_path, | 1362 | trans_pri = sctp_trans_elect_best(asoc->peer.active_path, trans_pf); |
1363 | asoc->peer.retran_path); | 1363 | trans_sec = trans_pri; |
1364 | trans_pri = sctp_trans_elect_best(trans_pri, trans_pf); | ||
1365 | trans_sec = asoc->peer.primary_path; | ||
1366 | } | 1364 | } |
1367 | 1365 | ||
1368 | /* Set the active and retran transports. */ | 1366 | /* Set the active and retran transports. */ |