slackhq/nebula · error
LocalAddr returned: %#v
Error message
LocalAddr returned: %#v
What it means
Type-guard failure in GenericConn.LocalAddr: UDPConn.LocalAddr() returned a type other than *net.UDPAddr (printed with %#v), so conversion to netip.AddrPort is impossible. Defensive branch; effectively unreachable for a real UDP socket.
Source
Thrown at udp/udp_generic.go:72
u.l.Debug("failed to write packet in batch", "udpAddr", addrs[i], "error", err)
}
}
return written, nil
}
func (u *GenericConn) LocalAddr() (netip.AddrPort, error) {
a := u.UDPConn.LocalAddr()
switch v := a.(type) {
case *net.UDPAddr:
addr, ok := netip.AddrFromSlice(v.IP)
if !ok {
return netip.AddrPort{}, fmt.Errorf("LocalAddr returned invalid IP address: %s", v.IP)
}
return netip.AddrPortFrom(addr, uint16(v.Port)), nil
default:
return netip.AddrPort{}, fmt.Errorf("LocalAddr returned: %#v", a)
}
}
func (u *GenericConn) ReloadConfig(c *config.C) {
}
func NewUDPStatsEmitter(udpConns []Conn) func() {
// No UDP stats for non-linux
return func() {}
}
type rawMessage struct {
Len uint32
}
func (u *GenericConn) ListenOut(r EncReader, flush func()) error {
buffer := make([]byte, MTU)View on GitHub (pinned to dd8f660c0a)
Solutions
- GenericConn.LocalAddr received a LocalAddr result that is not *net.UDPAddr — not expected for a UDP socket; update Go and nebula to current versions
- Ensure nothing wraps or replaces the underlying *net.UDPConn (custom listeners, test harnesses, socket libraries)
- Include the %#v detail from the error message in a bug report; it names the actual type returned
- Re-run with an explicit, valid UDP listen address in the nebula config
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at udp/udp_generic.go:72 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/67226ab2464a4e47.
Report an issue: GitHub.