{"record":{"id":"51c2fed016a70e6b","repo":"slackhq/nebula","slug":"entry-v-route-in-tun-routes-is-not-present","errorCode":null,"errorMessage":"entry %v.route in tun.routes is not present","messagePattern":"entry (.+?)\\.route in tun\\.routes is not present","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"overlay/route.go","lineNumber":113,"sourceCode":"\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"entry %v.mtu in tun.routes is not present\", i+1)\n\t\t}\n\n\t\tmtu, ok := rMtu.(int)\n\t\tif !ok {\n\t\t\tmtu, err = strconv.Atoi(rMtu.(string))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"entry %v.mtu in tun.routes is not an integer: %v\", i+1, err)\n\t\t\t}\n\t\t}\n\n\t\tif mtu < 500 {\n\t\t\treturn nil, fmt.Errorf(\"entry %v.mtu in tun.routes is below 500: %v\", i+1, mtu)\n\t\t}\n\n\t\trRoute, ok := m[\"route\"]\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"entry %v.route in tun.routes is not present\", i+1)\n\t\t}\n\n\t\tr := Route{\n\t\t\tInstall: true,\n\t\t\tMTU:     mtu,\n\t\t}\n\n\t\tr.Cidr, err = netip.ParsePrefix(fmt.Sprintf(\"%v\", rRoute))\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"entry %v.route in tun.routes failed to parse: %v\", i+1, err)\n\t\t}\n\n\t\tfound := false\n\t\tfor _, network := range networks {\n\t\t\tif network.Contains(r.Cidr.Addr()) && r.Cidr.Bits() >= network.Bits() {\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/overlay/route.go#L95-L131","documentation":"Config validation error in parseRoutes (overlay/route.go): the i+1-th entry of tun.routes lacks the required `route` key, so there is no CIDR to install. The map for that entry was read (mtu was validated just above) but contains no route prefix.","triggerScenarios":"getAllRoutesFromConfig encounters an entry like {mtu: 1300} with no route field, or a typo such as routes/cidr/network instead of route.","commonSituations":"Entries added by templating where the CIDR variable was empty and the key dropped; typos in key naming; incomplete configs edited by hand.","solutions":["Add a route key containing a CIDR prefix (e.g. route: 10.0.0.0/24) to the entry","Check for typos: the key must be exactly route","Use the reported entry index to locate the incomplete object","Ensure templating always emits the route key even when variables are filled late"],"exampleFix":"// before\n- mtu: 1300\n// after\n- mtu: 1300\n  route: 10.0.0.0/24","handlingStrategy":"validation","validationCode":"for i, e := range routes.([]any) {\n    m, _ := e.(map[string]any)\n    if _, ok := m[\"route\"]; !ok {\n        return fmt.Errorf(\"tun.routes entry %d missing required key route\", i+1)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Every route entry needs a route key with a CIDR string","Key name is exactly route (not cidr/network)","Ensure templates always render the route key","Schema-validate configs before apply"],"tags":["config","validation"],"backgroundTag":"schema-validation-failed","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"}