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

Frame types that are Protocol Violations #1107

Merged
merged 3 commits into from
Feb 12, 2018
Merged

Frame types that are Protocol Violations #1107

merged 3 commits into from
Feb 12, 2018

Conversation

martinduke
Copy link
Contributor

Specify that certain frames on unidirectional streams tear down the connection. STREAM, STREAM_BLOCKED, and RST_STREAM can't be on a send-only, and MAX_STREAM_DATA and STOP_SENDING can't be received on a receive-only.

Fixes #1047

Specify that certain frames on unidirectional streams tear down the connection. STREAM, STREAM_BLOCKED, and RST_STREAM can't be on a send-only, and MAX_STREAM_DATA and STOP_SENDING can't be received on a receive-only.
Fixed formatting error.
@@ -2097,6 +2100,9 @@ change in the initial limits (see {{zerortt-parameters}}).
The MAX_STREAM_DATA frame (type=0x05) is used in flow control to inform a peer
of the maximum amount of data that can be sent on a stream.

An endpoint that receives a MAX_STREAM_DATA frame for a receive-only stream
MUST terminate the connection with error PROTOCOL_VIOLATION.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about when receiving MAX_STREAM_DATA on a send or bidi stream but that has not yet been opened?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

MAX_STREAM_DATA is defined in the state machine as one way to open a stream.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks. But that only makes sense for bidi, or? If MAX_STREAM_DATA is received on a send stream way before the sender is ready to process it, what should it do? (I think there was some dicussion on related issues at some point).

Copy link
Contributor

Choose a reason for hiding this comment

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

In section 10.2.3 it says "The receiver only sends MAX_STREAM_DATA in the “Recv” state. " So I assume it would be a protocol error to send it in other states.

Copy link
Contributor Author

@martinduke martinduke Feb 12, 2018

Choose a reason for hiding this comment

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

Ah, I see now that this is for the receive end of bidirectional streams only. So for send-only streams, you're right.

However, for bidirectional streams, a node may open the stream and have that initial message be lost. Its receive direction will be in RECV (so it can send the frame) and can send MAX_STREAM_DATA, while nothing has happened at all at the peer.

@martinthomson martinthomson merged commit 4e8fe63 into quicwg:master Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants