Skip to content

Preserve large datagrams in UDP port forwarding - #2568

Open
xmarano wants to merge 1 commit into
apple:mainfrom
xmarano:fix/udp-forwarder-receive-buffer
Open

xmarano wants to merge 1 commit into
apple:mainfrom
xmarano:fix/udp-forwarder-receive-buffer

Conversation

@xmarano

@xmarano xmarano commented Nov 25, 2026

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Fixes #2567.

The UDP forwarder uses SwiftNIO's default 2,048-byte receive buffer on both channels. Set a 65,535-byte receive buffer on each channel so larger datagrams are forwarded intact.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

On macOS Apple silicon, the unmodified forwarder returned 2,048 bytes for both 2,049- and 8,192-byte payloads. With the fix, all four cases passed: 32, 2,048, 2,049, and 8,192 bytes.

This branch has not been deployed

No deployments
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.

[Bug]: Published UDP ports truncate datagrams larger than 2,048 bytes

1 participant