summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2010-05-16 16:52:56 +0000
committerrrs <rrs@FreeBSD.org>2010-05-16 16:52:56 +0000
commitef1b7b505d0edf3dc4152a85726821f0067eb9f4 (patch)
treee6c008946067caa2a700f28a133a403d16d59292 /sys/netinet
parent0bc7394c2cc30a69dea4973be008c969a9a154d8 (diff)
downloadFreeBSD-src-ef1b7b505d0edf3dc4152a85726821f0067eb9f4.zip
FreeBSD-src-ef1b7b505d0edf3dc4152a85726821f0067eb9f4.tar.gz
MFC 207985
Fix an old long time bug in generating a fwd-tsn. This would appear when greater than the size of mbuf TSN's would need to be skipped.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_output.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 522b52f..96a4575 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -9775,9 +9775,8 @@ sctp_fill_in_rest:
0xff, 0xff, cnt_of_space,
space_needed);
}
- cnt_of_skipped = (cnt_of_space -
- ((sizeof(struct sctp_forward_tsn_chunk)) /
- sizeof(struct sctp_strseq)));
+ cnt_of_skipped = cnt_of_space - sizeof(struct sctp_forward_tsn_chunk);
+ cnt_of_skipped /= sizeof(struct sctp_strseq);
/*-
* Go through and find the TSN that will be the one
* we report.
OpenPOWER on IntegriCloud