Skip to content

caddyhttp: expose initial_packet_size and disable_pmtud QUIC options (#8175) - #8230

Closed
ronitgupta138 wants to merge 1 commit into
caddyserver:masterfrom
ronitgupta138:feat/quic-pmtud-packet-size-options
Closed

ronitgupta138 wants to merge 1 commit into
caddyserver:masterfrom
ronitgupta138:feat/quic-pmtud-packet-size-options

Conversation

@ronitgupta138

Copy link
Copy Markdown

Description

Resolves #8175 by exposing initial_packet_size and disable_pmtud options in caddyhttp.Server and the Caddyfile servers block.

When path MTU discovery (RFC 8899) overshoots or fails on certain client paths (such as cellular or fixed-wireless networks without black-hole recovery), QUIC packets get dropped and HTTP/3 connections stall. In quic-go, InitialPacketSize acts as a lower bound, and only disabling PMTUD prevents subsequent packet growth beyond that initial size.

Changes:

  • Server struct (modules/caddyhttp/server.go): Added InitialPacketSize uint16 (json:"initial_packet_size,omitempty") and DisablePathMTUDiscovery bool (json:"disable_pmtud,omitempty").
  • Listener wiring (listeners.go & modules/caddyhttp/server.go): Added options to caddy.ListenQUICOptions, passing them to tr.ListenEarly on the underlying QUIC transport, and applied them to http3.Server.QUICConfig in buildHTTP3ServerWithWebTransport.
  • Caddyfile support (caddyconfig/httpcaddyfile/serveroptions.go): Supported initial_packet_size <size> and disable_pmtud in the servers global block, both as direct directives and inside a quic { ... } block, with validation for byte sizes between 1200 and 65535.
  • Documentation: Documented on the struct fields that operators should only tune these settings after packet capture or qlog evidence and that changes affect all new QUIC connections on that server.
  • Tests: Added test cases in listeners_test.go, modules/caddyhttp/server_test.go, and modules/caddyhttp/caddyfile_test.go.

Assistance Disclosure

I authored the code and tests with AI assistance, and verified all changes against the Caddy test suite.

…8175)

- Add InitialPacketSize and DisablePathMTUDiscovery fields to caddyhttp.Server
- Pass options through caddy.ListenQUICOptions and populate quic.Config
- Support initial_packet_size and disable_pmtud in Caddyfile servers block
- Add unit tests for listener options, server QUIC config, JSON marshaling, and Caddyfile parsing

Signed-off-by: Ronit Gupta <ronitgupta138@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CLAassistant

CLAassistant commented Oct 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@steadytao steadytao added the not reviewable ⛔ Cost of reviewing outweighs the implementation, this may be due to various reasons label Oct 16, 2026
@steadytao steadytao closed this Oct 16, 2026
@steadytao

Copy link
Copy Markdown
Member

Fails basic correctness. Duplicate code and such all over the place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not reviewable ⛔ Cost of reviewing outweighs the implementation, this may be due to various reasons

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose QUIC packet size / PMTUD options (HTTP/3 stalls when path MTU discovery overshoots)

4 participants