{"record":{"id":"e987e4ea336309e7","repo":"slackhq/nebula","slug":"no-gateway-found-for-v-in-the-list-of-vpn-network","errorCode":null,"errorMessage":"no gateway found for %v in the list of vpn networks","messagePattern":"no gateway found for (.+?) in the list of vpn networks","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"overlay/tun.go","lineNumber":130,"sourceCode":"\t\t\tcidr.Addr().AsSlice(),\n\t\t\tflipBytes(prefixToMask(cidr).AsSlice()),\n\t\t),\n\t)\n\treturn broadcast\n}\n\nfunc selectGateway(dest netip.Prefix, gateways []netip.Prefix) (netip.Prefix, error) {\n\tfor _, gateway := range gateways {\n\t\tif dest.Addr().Is4() && gateway.Addr().Is4() {\n\t\t\treturn gateway, nil\n\t\t}\n\n\t\tif dest.Addr().Is6() && gateway.Addr().Is6() {\n\t\t\treturn gateway, nil\n\t\t}\n\t}\n\n\treturn netip.Prefix{}, fmt.Errorf(\"no gateway found for %v in the list of vpn networks\", dest)\n}\n","sourceCodeStart":112,"sourceCodeEnd":132,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/overlay/tun.go#L112-L132","documentation":"Validation error from selectGateway (tun address setup): none of the gateway prefixes matches the address family of the destination route — an IPv4 route found no IPv4 gateway, or IPv6 no IPv6. The destination prefix is named in the message; adding the route/delRoute operation aborts.","triggerScenarios":"Thrown at overlay/tun.go:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the tun config's gateway list covers the address family of every route","Add an IPv6 (or IPv4) gateway when routing that family","Remove routes whose family has no 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"}