{"record":{"id":"8fa40c2a048c240d","repo":"slackhq/nebula","slug":"entry-v-via-in-tun-unsafe-routes-failed-to-parse","errorCode":null,"errorMessage":"entry %v.via in tun.unsafe_routes failed to parse address: %v","messagePattern":"entry (.+?)\\.via in tun\\.unsafe_routes failed to parse address: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"overlay/route.go","lineNumber":216,"sourceCode":"\t\t\t}\n\t\t}\n\n\t\tif metric < 0 || metric > math.MaxInt32 {\n\t\t\treturn nil, fmt.Errorf(\"entry %v.metric in tun.unsafe_routes is not in range (0-%d) : %v\", i+1, math.MaxInt32, metric)\n\t\t}\n\n\t\trVia, ok := m[\"via\"]\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"entry %v.via in tun.unsafe_routes is not present\", i+1)\n\t\t}\n\n\t\tvar gateways routing.Gateways\n\n\t\tswitch via := rVia.(type) {\n\t\tcase string:\n\t\t\tviaIp, err := netip.ParseAddr(via)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"entry %v.via in tun.unsafe_routes failed to parse address: %v\", i+1, err)\n\t\t\t}\n\n\t\t\tgateways = routing.Gateways{routing.NewGateway(viaIp, 1)}\n\n\t\tcase []any:\n\t\t\tgateways = make(routing.Gateways, len(via))\n\t\t\tfor ig, v := range via {\n\t\t\t\tgatewayMap, ok := v.(map[string]any)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"entry %v in tun.unsafe_routes[%v].via is invalid\", i+1, ig+1)\n\t\t\t\t}\n\n\t\t\t\trGateway, ok := gatewayMap[\"gateway\"]\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"entry .gateway in tun.unsafe_routes[%v].via[%v] is not present\", i+1, ig+1)\n\t\t\t\t}\n\n\t\t\t\tparsedGateway, ok := rGateway.(string)","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/overlay/route.go#L198-L234","documentation":"Config validation error in parseUnsafeRoutes: the `via` key of the i+1-th entry is a string but netip.ParseAddr rejected it as an IP address (e.g. a hostname or malformed IP). The ParseAddr error is included.","triggerScenarios":"Thrown at overlay/route.go:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a literal IP address for via (hostnames are not resolved)","Fix typos in the IP literal"],"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"}