{"record":{"id":"d8f13ea759cfa9ab","repo":"slackhq/nebula","slug":"entry-gateway-in-tun-unsafe-routes-v-via-v-fa","errorCode":null,"errorMessage":"entry .gateway in tun.unsafe_routes[%v].via[%v] failed to parse address: %v","messagePattern":"entry \\.gateway in tun\\.unsafe_routes\\[(.+?)\\]\\.via\\[(.+?)\\] failed to parse address: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"overlay/route.go","lineNumber":241,"sourceCode":"\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)\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 a string\", i+1, ig+1)\n\t\t\t\t}\n\n\t\t\t\tgatewayIp, err := netip.ParseAddr(parsedGateway)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"entry .gateway in tun.unsafe_routes[%v].via[%v] failed to parse address: %v\", i+1, ig+1, err)\n\t\t\t\t}\n\n\t\t\t\trGatewayWeight, ok := gatewayMap[\"weight\"]\n\t\t\t\tif !ok {\n\t\t\t\t\trGatewayWeight = 1\n\t\t\t\t}\n\n\t\t\t\tgatewayWeight, ok := rGatewayWeight.(int)\n\t\t\t\tif !ok {\n\t\t\t\t\t_, err = strconv.ParseInt(rGatewayWeight.(string), 10, 32)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"entry .weight in tun.unsafe_routes[%v].via[%v] is not an integer\", i+1, ig+1)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif gatewayWeight < 1 || gatewayWeight > math.MaxInt32 {\n\t\t\t\t\treturn nil, fmt.Errorf(\"entry .weight in tun.unsafe_routes[%v].via[%v] is not in range (1-%d) : %v\", i+1, ig+1, math.MaxInt32, gatewayWeight)\n\t\t\t\t}","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/overlay/route.go#L223-L259","documentation":"Configuration validation error in parseUnsafeRoutes for multipath unsafe routes. The 'gateway' string in a via list entry failed netip.ParseAddr, meaning it is not a valid IP address (bad syntax, hostname given instead of an IP, or an invalid IPv6 literal). The wrapped netip error gives the exact parse failure; the route entry is rejected.","triggerScenarios":"Thrown at overlay/route.go:241 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid literal IP address for gateway"],"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"}