slackhq/nebula · error
no gateway found for %v in the list of vpn networks
Error message
no gateway found for %v in the list of vpn networks
What it means
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.
Source
Thrown at overlay/tun.go:130
cidr.Addr().AsSlice(),
flipBytes(prefixToMask(cidr).AsSlice()),
),
)
return broadcast
}
func selectGateway(dest netip.Prefix, gateways []netip.Prefix) (netip.Prefix, error) {
for _, gateway := range gateways {
if dest.Addr().Is4() && gateway.Addr().Is4() {
return gateway, nil
}
if dest.Addr().Is6() && gateway.Addr().Is6() {
return gateway, nil
}
}
return netip.Prefix{}, fmt.Errorf("no gateway found for %v in the list of vpn networks", dest)
}
View on GitHub (pinned to dd8f660c0a)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at overlay/tun.go:130 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slackhq/nebula@dd8f660c0a (2026-09-03).
Data as JSON: /api/errors/e987e4ea336309e7.
Report an issue: GitHub.