When computing the partial delivery point, take the

receiver socket buffer size correctly into account.

MFC after: 1 week
This commit is contained in:
Michael Tuexen 2013-09-07 00:45:24 +00:00
parent d4c612c3b8
commit d4d23375d3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255337

View File

@ -789,13 +789,12 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc)
* but should we?
*/
if (stcb->sctp_socket) {
pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket),
pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT,
stcb->sctp_ep->partial_delivery_point);
} else {
pd_point = stcb->sctp_ep->partial_delivery_point;
}
if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) {
/*
* Yes, we setup to start reception, by
* backing down the TSN just in case we
@ -2491,7 +2490,7 @@ sctp_service_queues(struct sctp_tcb *stcb, struct sctp_association *asoc)
* delivery queue and something can be delivered.
*/
if (stcb->sctp_socket) {
pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket),
pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT,
stcb->sctp_ep->partial_delivery_point);
} else {
pd_point = stcb->sctp_ep->partial_delivery_point;