svn commit: r345460 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sat Mar 23 22:46:30 UTC 2019
Author: tuexen
Date: Sat Mar 23 22:46:29 2019
New Revision: 345460
URL: https://svnweb.freebsd.org/changeset/base/345460
Log:
Limit the number of bytes which can be queued for SCTP sockets.
This is joint work with rrs at .
Reported by: syzbot+307f167f9bc214f095bc at syzkaller.appspotmail.com
MFC after: 1 week
Modified:
head/sys/netinet/sctp_output.c
Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c Sat Mar 23 22:44:11 2019 (r345459)
+++ head/sys/netinet/sctp_output.c Sat Mar 23 22:46:29 2019 (r345460)
@@ -13026,12 +13026,7 @@ sctp_lower_sosend(struct socket *so,
/* Calculate the maximum we can send */
inqueue_bytes = stcb->asoc.total_output_queue_size - (stcb->asoc.chunks_on_out_queue * SCTP_DATA_CHUNK_OVERHEAD(stcb));
if (SCTP_SB_LIMIT_SND(so) > inqueue_bytes) {
- if (non_blocking) {
- /* we already checked for non-blocking above. */
- max_len = sndlen;
- } else {
- max_len = SCTP_SB_LIMIT_SND(so) - inqueue_bytes;
- }
+ max_len = SCTP_SB_LIMIT_SND(so) - inqueue_bytes;
} else {
max_len = 0;
}
More information about the svn-src-head
mailing list