summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_output.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2006-11-11 22:44:12 +0000
committerrrs <rrs@FreeBSD.org>2006-11-11 22:44:12 +0000
commitfb5651e047ba819adc96c9f9e76b4559123edf34 (patch)
tree7a67d3389c46e84245fca92a06dcb77f66dbafcb /sys/netinet/sctp_output.c
parent26d0f2fab6f6582478cd2a21695844600a1bd490 (diff)
downloadFreeBSD-src-fb5651e047ba819adc96c9f9e76b4559123edf34.zip
FreeBSD-src-fb5651e047ba819adc96c9f9e76b4559123edf34.tar.gz
In a true restart case, the send_lock was
not being aquired. This meant that when we cleanup the outbound we may have one in transit to be added with the old sequence number. This is bad since then we loose a message :( Also the report_outbound needed to have the right lock when its called which it did not.. I added the lock with of course a flag since we want to have the lock before we call it in the restart case. This also fixed the FIX ME case where, in the cookie collision case, we mark for retransmit any that were bundled with the cookie that was dropped. This also means changes to the output routine so we can assure getting the COOKIE-ACK sent BEFORE we retransmit the Data. Approved by: gnn
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r--sys/netinet/sctp_output.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 78b9a3e..e71e5ac 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -7164,7 +7164,6 @@ sctp_chunk_output(struct sctp_inpcb *inp,
un_sent = (stcb->asoc.total_output_queue_size - stcb->asoc.total_flight);
-
if ((un_sent <= 0) &&
(TAILQ_EMPTY(&asoc->control_send_queue)) &&
(asoc->sent_queue_retran_cnt == 0)) {
@@ -7184,7 +7183,17 @@ sctp_chunk_output(struct sctp_inpcb *inp,
* Ok, it is retransmission time only, we send out only ONE
* packet with a single call off to the retran code.
*/
- if (from_where != SCTP_OUTPUT_FROM_HB_TMR) {
+ if (from_where == SCTP_OUTPUT_FROM_COOKIE_ACK) {
+ /*
+ * Special hook for handling cookiess discarded by
+ * peer that carried data. Send cookie-ack only and
+ * then the next call with get the retran's.
+ */
+ (void)sctp_med_chunk_output(inp, stcb, asoc, &num_out, &reason_code, 1,
+ &cwnd_full, from_where,
+ &now, &now_filled, frag_point);
+ return (0);
+ } else if (from_where != SCTP_OUTPUT_FROM_HB_TMR) {
/* if its not from a HB then do it */
ret = sctp_chunk_retransmission(inp, stcb, asoc, &num_out, &now, &now_filled);
} else {
OpenPOWER on IntegriCloud