Skip to content

Commit

Permalink
Do not have more data in a pipeline than the split_send_fragment
Browse files Browse the repository at this point in the history
We shouldn't be putting more data into a pipeline than the value of
split_send_fragment.

This is a backport of a fix which was included in a much larger commit in
master (c6186792b98) related to moving the pipelining code into the new
record layer that exists there.
  • Loading branch information
dongbeiouba committed Jun 25, 2024
1 parent e85d892 commit 450c859
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ssl/record/rec_layer_s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,14 +611,13 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, size_t len,
if (numpipes > maxpipes)
numpipes = maxpipes;

if (n / numpipes >= max_send_fragment) {
if (n / numpipes >= split_send_fragment) {
/*
* We have enough data to completely fill all available
* pipelines
*/
for (j = 0; j < numpipes; j++) {
pipelens[j] = max_send_fragment;
}
for (j = 0; j < numpipes; j++)
pipelens[j] = split_send_fragment;
} else {
/* We can partially fill all available pipelines */
tmppipelen = n / numpipes;
Expand Down

0 comments on commit 450c859

Please sign in to comment.