{"record":{"id":"0d10f46be03c7d7b","repo":"XTLS/Xray-core","slug":"reserved-should-be-empty-or-3-bytes","errorCode":null,"errorMessage":"\"reserved\" should be empty or 3 bytes","messagePattern":"\"reserved\" should be empty or 3 bytes","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/wireguard.go","lineNumber":123,"sourceCode":"\t\t\t\tEmail:   p.Email,\n\t\t\t\tLevel:   p.Level,\n\t\t\t\tAccount: serial.ToTypedMessage(m),\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\t\tif err := task.ParallelForN(len(c.Peers), processUser); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif c.MTU == 0 {\n\t\tconfig.Mtu = 1420\n\t} else {\n\t\tconfig.Mtu = c.MTU\n\t}\n\n\tif len(c.Reserved) != 0 && len(c.Reserved) != 3 {\n\t\treturn nil, errors.New(`\"reserved\" should be empty or 3 bytes`)\n\t}\n\tconfig.Reserved = c.Reserved\n\n\tswitch strings.ToLower(c.DomainStrategy) {\n\tcase \"forceip\", \"\":\n\t\tconfig.DomainStrategy = wireguard.DeviceConfig_FORCE_IP\n\tcase \"forceipv4\":\n\t\tconfig.DomainStrategy = wireguard.DeviceConfig_FORCE_IP4\n\tcase \"forceipv6\":\n\t\tconfig.DomainStrategy = wireguard.DeviceConfig_FORCE_IP6\n\tcase \"forceipv4v6\":\n\t\tconfig.DomainStrategy = wireguard.DeviceConfig_FORCE_IP46\n\tcase \"forceipv6v4\":\n\t\tconfig.DomainStrategy = wireguard.DeviceConfig_FORCE_IP64\n\tdefault:\n\t\treturn nil, errors.New(\"unsupported domain strategy: \", c.DomainStrategy)\n\t}\n","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/wireguard.go#L105-L141","documentation":"Error \"\"reserved\" should be empty or 3 bytes\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at infra/conf/wireguard.go:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}