Repository navigation
[connect-udp] cap the size of the maximum capsule being buffered - #3754
Merged
Merged
Conversation
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
The check compared the encoded incomplete capsule bytes against the Capsule Value size limit. The parser already rejects oversized Capsule Values after decoding Capsule Length, and this extra check could reject otherwise valid incomplete capsules due to the encoded Type and Length bytes. Co-authored-by: Codex <[email protected]>
udp_write_stream is called after udp_connect has created self->sock. The function already asserts this invariant, so the self->sock == NULL branch cannot be reached under the write_req/proceed_req contract. Co-authored-by: Codex <[email protected]>
udp_connect invokes write_req directly after creating the UDP socket to consume request bytes already buffered by the protocol layer. If capsule parsing rejects those bytes, report the failure through proceed_req so the protocol handler can close or reset the request stream. Add H1 coverage that sends tunnel headers and an oversized capsule in one write, exercising the early-data path before normal request streaming resumes. Co-authored-by: Codex <[email protected]>
Use an in-process nonblocking UDP socket as the origin and check after each oversized-capsule case that no datagram reached it. This makes failures point at the protocol path that leaked the datagram instead of relying on one aggregate origin-output assertion. Co-authored-by: Codex <[email protected]>
Keep the UDP origin as a nonblocking socket in the test process and use a fixed UDP datagram capsule after the oversized unknown capsule. This removes the unused payload plumbing and echo-output checks while keeping per-case origin leak assertions. Co-authored-by: Codex <[email protected]>
Run h2o-httpclient directly with stdout and stderr redirected to a temp file, then delay in Perl before writing the oversized capsule bytes to stdin. This removes the open3 helper while preserving coverage of the non-early streaming path. Co-authored-by: Codex <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.