{"record":{"id":"1ca23fa33fd1eb6a","repo":"netbirdio/netbird","slug":"set-mtu-w","errorCode":null,"errorMessage":"set mtu: %w","messagePattern":"set mtu: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/iface/device/device_kernel_unix.go","lineNumber":68,"sourceCode":"\nfunc (t *TunKernelDevice) Create() (WGConfigurer, error) {\n\tlink := newWGLink(t.name)\n\n\tif err := link.recreate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"recreate: %w\", err)\n\t}\n\n\tt.link = link\n\n\tif err := t.assignAddr(); err != nil {\n\t\treturn nil, fmt.Errorf(\"assign addr: %w\", err)\n\t}\n\n\t// TODO: do a MTU discovery\n\tlog.Debugf(\"setting MTU: %d interface: %s\", t.mtu, t.name)\n\n\tif err := link.setMTU(int(t.mtu)); err != nil {\n\t\treturn nil, fmt.Errorf(\"set mtu: %w\", err)\n\t}\n\n\tconfigurer := configurer.NewKernelConfigurer(t.name)\n\n\tif err := configurer.ConfigureInterface(t.key, t.wgPort); err != nil {\n\t\treturn nil, fmt.Errorf(\"error configuring interface: %s\", err)\n\t}\n\n\treturn configurer, nil\n}\n\nfunc (t *TunKernelDevice) Up() (*udpmux.UniversalUDPMuxDefault, error) {\n\tif t.udpMux != nil {\n\t\treturn t.udpMux, nil\n\t}\n\n\tif t.link == nil {\n\t\treturn nil, fmt.Errorf(\"device is not ready yet\")","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/iface/device/device_kernel_unix.go#L50-L86","documentation":"Setting the MTU on the kernel WireGuard link failed during Create. Netlink LinkSetMTU was rejected, e.g. MTU out of range for the device; the interface is left configured with the default MTU path aborted.","triggerScenarios":"Thrown at client/iface/device/device_kernel_unix.go:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an MTU within the interface range (typically 1280-65535)","Retry Create","Check for concurrent interface reconfiguration"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","contentChangedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}