summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2009-02-12 17:31:39 +0000
committerRandall Stewart <rrs@FreeBSD.org>2009-02-12 17:31:39 +0000
commitb14dcf5dbfbac359961db6af34b51a17f97e43a7 (patch)
tree3e02fcb40ddfa174fdc259d4b8435c3e762a882d
parent6513931fbf40d28706854ce22e33b56d88f42633 (diff)
Notes
-rw-r--r--sys/netinet/sctp_output.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 260a79d6de5fd..d85234003d30b 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -11686,7 +11686,12 @@ sctp_copy_it_in(struct sctp_tcb *stcb,
sp->put_last_out = 0;
resv_in_first = sizeof(struct sctp_data_chunk);
sp->data = sp->tail_mbuf = NULL;
+ if (sp->length == 0) {
+ *error = 0;
+ goto skip_copy;
+ }
*error = sctp_copy_one(sp, uio, resv_in_first);
+skip_copy:
if (*error) {
sctp_free_a_strmoq(stcb, sp);
sp = NULL;
@@ -12448,7 +12453,8 @@ sctp_lower_sosend(struct socket *so,
goto skip_preblock;
}
if (((max_len <= local_add_more) &&
- (SCTP_SB_LIMIT_SND(so) > local_add_more)) ||
+ (SCTP_SB_LIMIT_SND(so) >= local_add_more)) ||
+ (max_len == 0) ||
((stcb->asoc.chunks_on_out_queue + stcb->asoc.stream_queue_cnt) >= SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue))) { /* if */
/* No room right now ! */
SOCKBUF_LOCK(&so->so_snd);
@@ -13063,7 +13069,7 @@ skip_out_eof:
(void)sctp_med_chunk_output(inp, stcb, &stcb->asoc, &num_out,
&reason, 1, &cwnd_full, 1, &now, &now_filled, frag_point, SCTP_SO_LOCKED);
}
- SCTPDBG(SCTP_DEBUG_OUTPUT1, "USR Send complete qo:%d prw:%d unsent:%d tf:%d cooq:%d toqs:%d err:%d",
+ SCTPDBG(SCTP_DEBUG_OUTPUT1, "USR Send complete qo:%d prw:%d unsent:%d tf:%d cooq:%d toqs:%d err:%d\n",
queue_only, stcb->asoc.peers_rwnd, un_sent,
stcb->asoc.total_flight, stcb->asoc.chunks_on_out_queue,
stcb->asoc.total_output_queue_size, error);