slackhq/nebula · error
entry .gateway in tun.unsafe_routes
Error message
entry .gateway in tun.unsafe_routes[%v].via[%v] is not present
What it means
Configuration validation error in parseUnsafeRoutes for the multi-gateway form of tun.unsafe_routes. When a route's 'via' is a list of gateway maps, each map must contain a 'gateway' key; this fires when one of those maps omits it, meaning the gateway address for that multipath route entry is unspecified and no route can be built for it.
Solutions
- Add gateway: <IP> to each via list element
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at overlay/route.go:231 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/40ddb69e0e3a99ef.
Report an issue: GitHub.
Appendix: source
Thrown at overlay/route.go:231
case string:
viaIp, err := netip.ParseAddr(via)
if err != nil {
return nil, fmt.Errorf("entry %v.via in tun.unsafe_routes failed to parse address: %v", i+1, err)
}
gateways = routing.Gateways{routing.NewGateway(viaIp, 1)}
case []any:
gateways = make(routing.Gateways, len(via))
for ig, v := range via {
gatewayMap, ok := v.(map[string]any)
if !ok {
return nil, fmt.Errorf("entry %v in tun.unsafe_routes[%v].via is invalid", i+1, ig+1)
}
rGateway, ok := gatewayMap["gateway"]
if !ok {
return nil, fmt.Errorf("entry .gateway in tun.unsafe_routes[%v].via[%v] is not present", i+1, ig+1)
}
parsedGateway, ok := rGateway.(string)
if !ok {
return nil, fmt.Errorf("entry .gateway in tun.unsafe_routes[%v].via[%v] is not a string", i+1, ig+1)
}
gatewayIp, err := netip.ParseAddr(parsedGateway)
if err != nil {
return nil, fmt.Errorf("entry .gateway in tun.unsafe_routes[%v].via[%v] failed to parse address: %v", i+1, ig+1, err)
}
rGatewayWeight, ok := gatewayMap["weight"]
if !ok {
rGatewayWeight = 1
}
gatewayWeight, ok := rGatewayWeight.(int)View on GitHub (pinned to dd8f660c0a)