{"record":{"id":"18a1a264d51c7cd6","repo":"slackhq/nebula","slug":"entry-gateway-in-tun-unsafe-routes-v-via-v-is-18a1a2","errorCode":null,"errorMessage":"entry .gateway in tun.unsafe_routes[%v].via[%v] is not a string","messagePattern":"entry \\.gateway in tun\\.unsafe_routes\\[(.+?)\\]\\.via\\[(.+?)\\] is not a string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"overlay/route.go","lineNumber":236,"sourceCode":"\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)\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}","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/overlay/route.go#L218-L254","documentation":"Configuration validation error in parseUnsafeRoutes for multipath unsafe routes. After confirming a 'via' list entry has a 'gateway' key, the value is type-asserted to a string; this fires when gateway is present but of the wrong YAML type (e.g. a number, IP-literal object, or nested map) instead of a string address, so it cannot be passed to netip.ParseAddr.","triggerScenarios":"Thrown at overlay/route.go:236 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Quote the gateway value or write it as an IP string, e.g. gateway: \"10.0.0.1\""],"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"}