aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/associola.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r--net/sctp/associola.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 99c93ee98ad9..e41feff19e43 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -87,9 +87,6 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
87 /* Retrieve the SCTP per socket area. */ 87 /* Retrieve the SCTP per socket area. */
88 sp = sctp_sk((struct sock *)sk); 88 sp = sctp_sk((struct sock *)sk);
89 89
90 /* Init all variables to a known value. */
91 memset(asoc, 0, sizeof(struct sctp_association));
92
93 /* Discarding const is appropriate here. */ 90 /* Discarding const is appropriate here. */
94 asoc->ep = (struct sctp_endpoint *)ep; 91 asoc->ep = (struct sctp_endpoint *)ep;
95 sctp_endpoint_hold(asoc->ep); 92 sctp_endpoint_hold(asoc->ep);
@@ -762,7 +759,8 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
762 asoc->peer.retran_path = peer; 759 asoc->peer.retran_path = peer;
763 } 760 }
764 761
765 if (asoc->peer.active_path == asoc->peer.retran_path) { 762 if (asoc->peer.active_path == asoc->peer.retran_path &&
763 peer->state != SCTP_UNCONFIRMED) {
766 asoc->peer.retran_path = peer; 764 asoc->peer.retran_path = peer;
767 } 765 }
768 766
@@ -818,8 +816,6 @@ void sctp_assoc_del_nonprimary_peers(struct sctp_association *asoc,
818 if (t != primary) 816 if (t != primary)
819 sctp_assoc_rm_peer(asoc, t); 817 sctp_assoc_rm_peer(asoc, t);
820 } 818 }
821
822 return;
823} 819}
824 820
825/* Engage in transport control operations. 821/* Engage in transport control operations.
@@ -1320,12 +1316,13 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
1320 /* Keep track of the next transport in case 1316 /* Keep track of the next transport in case
1321 * we don't find any active transport. 1317 * we don't find any active transport.
1322 */ 1318 */
1323 if (!next) 1319 if (t->state != SCTP_UNCONFIRMED && !next)
1324 next = t; 1320 next = t;
1325 } 1321 }
1326 } 1322 }
1327 1323
1328 asoc->peer.retran_path = t; 1324 if (t)
1325 asoc->peer.retran_path = t;
1329 1326
1330 SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_update_retran_path:association" 1327 SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_update_retran_path:association"
1331 " %p addr: ", 1328 " %p addr: ",
@@ -1485,7 +1482,7 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned len)
1485 if (asoc->rwnd >= len) { 1482 if (asoc->rwnd >= len) {
1486 asoc->rwnd -= len; 1483 asoc->rwnd -= len;
1487 if (over) { 1484 if (over) {
1488 asoc->rwnd_press = asoc->rwnd; 1485 asoc->rwnd_press += asoc->rwnd;
1489 asoc->rwnd = 0; 1486 asoc->rwnd = 0;
1490 } 1487 }
1491 } else { 1488 } else {