Author: tuexen
Date: Sat May  4 12:02:41 2019
New Revision: 347111
URL: https://svnweb.freebsd.org/changeset/base/347111

Log:
  MFC r345460:
  Limit the number of bytes which can be queued for SCTP sockets.
  This is joint work with rrs@.

Modified:
  stable/12/sys/netinet/sctp_output.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/sctp_output.c
==============================================================================
--- stable/12/sys/netinet/sctp_output.c Sat May  4 11:24:19 2019        
(r347110)
+++ stable/12/sys/netinet/sctp_output.c Sat May  4 12:02:41 2019        
(r347111)
@@ -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;
        }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to