summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_indata.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-11-10 00:47:14 +0000
committerrrs <rrs@FreeBSD.org>2007-11-10 00:47:14 +0000
commitf665676ee0c40dc42689e0d0c58ab9d2e740d3eb (patch)
treef5dd71b9483c78829024c03666455470d8f69868 /sys/netinet/sctp_indata.c
parente46a6747e9ed3facdd22569f16238fad69a0eadb (diff)
downloadFreeBSD-src-f665676ee0c40dc42689e0d0c58ab9d2e740d3eb.zip
FreeBSD-src-f665676ee0c40dc42689e0d0c58ab9d2e740d3eb.tar.gz
- Fix a bug in sctp_calc_rwnd() which resulted in wrong rwnd predictions.
- Fix a signedness problem that shows up in some 64 bit platforms (macos). MFC after: 1 week
Diffstat (limited to 'sys/netinet/sctp_indata.c')
-rw-r--r--sys/netinet/sctp_indata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index 575d671..a7f43da 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -170,8 +170,8 @@ sctp_calc_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc)
*/
result = 1;
}
- if (asoc->my_rwnd &&
- (asoc->my_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_receiver)) {
+ if (result &&
+ (result < stcb->sctp_ep->sctp_ep.sctp_sws_receiver)) {
/* SWS engaged, tell peer none left */
result = 1;
}
OpenPOWER on IntegriCloud