[GH-ISSUE #5549] Expose MTU in embed.Options #11727

Closed
opened 2026-08-05 01:30:43 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @tham-le on GitHub (Mar 9, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5549

Is your feature request related to a problem? Please describe.

The client/embed package's Options struct does not expose a way to set the WireGuard tunnel MTU. The underlying profilemanager.ConfigInput supports MTU *uint16, and profilemanager.Config stores MTU uint16, but embed.New() constructs the ConfigInput without wiring an MTU field from Options.

This means embedded clients are stuck with the default MTU of 1280 (iface.DefaultMTU) unless they use the ConfigPath workaround — writing a config file containing {"MTU": N} and passing it via Options.ConfigPath.

Describe the solution you'd like
Add MTU *uint16 to embed.Options and wire it through to ConfigInput.MTU in embed.New().

Additional context

MTU 1280 is too small for QUIC. QUIC's minimum datagram size is 1200 bytes, but with headers the actual UDP payload reaches ~1326 bytes.

Originally created by @tham-le on GitHub (Mar 9, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5549 **Is your feature request related to a problem? Please describe.** The `client/embed` package's `Options` struct does not expose a way to set the WireGuard tunnel MTU. The underlying `profilemanager.ConfigInput` supports `MTU *uint16`, and `profilemanager.Config` stores `MTU uint16`, but `embed.New()` constructs the `ConfigInput` without wiring an MTU field from `Options`. This means embedded clients are stuck with the default MTU of 1280 (`iface.DefaultMTU`) unless they use the `ConfigPath` workaround — writing a config file containing `{"MTU": N}` and passing it via `Options.ConfigPath`. **Describe the solution you'd like** Add `MTU *uint16` to `embed.Options` and wire it through to `ConfigInput.MTU` in `embed.New()`. **Additional context** MTU 1280 is too small for QUIC. QUIC's minimum datagram size is 1200 bytes, but with headers the actual UDP payload reaches ~1326 bytes.
saavagebueno added the feature-request label 2026-08-05 01:30:43 -04:00
Sign in to join this conversation.
No Label feature-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11727