Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #518: lsquic compliance with RFC 9000 for MAX_STREAM_DATA frame #525

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/liblsquic/lsquic_full_conn_ietf.c
Original file line number Diff line number Diff line change
Expand Up @@ -6186,6 +6186,21 @@ process_max_stream_data_frame (struct ietf_full_conn *conn,
return 0;
}

if ((conn->ifc_flags & (IFC_SERVER|IFC_HTTP)) == IFC_HTTP
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to move those two tests under if (is_peer_initiated(conn, stream_id)), just in case side effects for regular MAX_STREAM_DATA processing.

&& SIT_BIDI_SERVER == (stream_id & SIT_MASK))
{
ABORT_QUIETLY(1, HEC_STREAM_CREATION_ERROR, "HTTP/3 server "
"is not allowed to initiate bidirectional streams (got "
"STREAM frame for stream %"PRIu64, stream_id);
return 0;
}

if (conn->ifc_flags & IFC_CLOSING)
{
LSQ_DEBUG("Connection closing: ignore frame");
return parsed_len;
}

stream = find_stream_by_id(conn, stream_id);
if (stream)
lsquic_stream_window_update(stream, max_data);
Expand Down Expand Up @@ -6223,6 +6238,8 @@ process_max_stream_data_frame (struct ietf_full_conn *conn,
&& (!valid_stream_id(conn->ifc_max_req_id)
|| conn->ifc_max_req_id < stream_id))
conn->ifc_max_req_id = stream_id;

lsquic_stream_window_update(stream, max_data);
}
else
{
Expand Down