summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_indata.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2013-09-07 00:45:24 +0000
committertuexen <tuexen@FreeBSD.org>2013-09-07 00:45:24 +0000
commitaa05f03aae06784dfb1fa88378812cfaea2d3ebb (patch)
tree9b934e2b7f80fbba5dd41be0b22392dbffd1726e /sys/netinet/sctp_indata.c
parent979e7776c1b7757d835e4ee31d87ff732f881dc8 (diff)
downloadFreeBSD-src-aa05f03aae06784dfb1fa88378812cfaea2d3ebb.zip
FreeBSD-src-aa05f03aae06784dfb1fa88378812cfaea2d3ebb.tar.gz
When computing the partial delivery point, take the
receiver socket buffer size correctly into account. MFC after: 1 week
Diffstat (limited to 'sys/netinet/sctp_indata.c')
-rw-r--r--sys/netinet/sctp_indata.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index 7ebf7f1..26fcf85 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -789,13 +789,12 @@ doit_again:
* 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 @@ doit_again:
* 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;
OpenPOWER on IntegriCloud