{"record":{"id":"49dfc1a076806bdb","repo":"slackhq/nebula","slug":"entry-v-in-tun-unsafe-routes-is-invalid","errorCode":null,"errorMessage":"entry %v in tun.unsafe_routes is invalid","messagePattern":"entry (.+?) in tun\\.unsafe_routes is invalid","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"overlay/route.go","lineNumber":170,"sourceCode":"\tr := c.Get(\"tun.unsafe_routes\")\n\tif r == nil {\n\t\treturn []Route{}, nil\n\t}\n\n\trawRoutes, ok := r.([]any)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"tun.unsafe_routes is not an array\")\n\t}\n\n\tif len(rawRoutes) < 1 {\n\t\treturn []Route{}, nil\n\t}\n\n\troutes := make([]Route, len(rawRoutes))\n\tfor i, r := range rawRoutes {\n\t\tm, ok := r.(map[string]any)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"entry %v in tun.unsafe_routes is invalid\", i+1)\n\t\t}\n\n\t\tvar mtu int\n\t\tif rMtu, ok := m[\"mtu\"]; ok {\n\t\t\tmtu, ok = rMtu.(int)\n\t\t\tif !ok {\n\t\t\t\tmtu, err = strconv.Atoi(rMtu.(string))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"entry %v.mtu in tun.unsafe_routes is not an integer: %v\", i+1, err)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif mtu != 0 && mtu < 500 {\n\t\t\t\treturn nil, fmt.Errorf(\"entry %v.mtu in tun.unsafe_routes is below 500: %v\", i+1, mtu)\n\t\t\t}\n\t\t}\n\n\t\trMetric, ok := m[\"metric\"]","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/overlay/route.go#L152-L188","documentation":"Config validation error in parseUnsafeRoutes: the i+1-th element of the tun.unsafe_routes list did not type-assert to map[string]any — it is a scalar or nested list where a mapping of route options was expected.","triggerScenarios":"Thrown at overlay/route.go:170 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make each tun.unsafe_routes entry a YAML mapping with keys like route, via, mtu","Remove stray scalars or hyphen-less lines in the list"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dd8f660c0ac37903ec4080ca4d3c861ba9342ceb","analyzedAt":"2026-09-03T11:13:55.444Z","contentChangedAt":"2026-09-03T11:13:55.444Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}