{"record":{"id":"67226ab2464a4e47","repo":"slackhq/nebula","slug":"localaddr-returned-v-67226a","errorCode":null,"errorMessage":"LocalAddr returned: %#v","messagePattern":"LocalAddr returned: %#v","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"udp/udp_generic.go","lineNumber":72,"sourceCode":"\t\t\tu.l.Debug(\"failed to write packet in batch\", \"udpAddr\", addrs[i], \"error\", err)\n\t\t}\n\t}\n\treturn written, nil\n}\n\nfunc (u *GenericConn) LocalAddr() (netip.AddrPort, error) {\n\ta := u.UDPConn.LocalAddr()\n\n\tswitch v := a.(type) {\n\tcase *net.UDPAddr:\n\t\taddr, ok := netip.AddrFromSlice(v.IP)\n\t\tif !ok {\n\t\t\treturn netip.AddrPort{}, fmt.Errorf(\"LocalAddr returned invalid IP address: %s\", v.IP)\n\t\t}\n\t\treturn netip.AddrPortFrom(addr, uint16(v.Port)), nil\n\n\tdefault:\n\t\treturn netip.AddrPort{}, fmt.Errorf(\"LocalAddr returned: %#v\", a)\n\t}\n}\n\nfunc (u *GenericConn) ReloadConfig(c *config.C) {\n\n}\n\nfunc NewUDPStatsEmitter(udpConns []Conn) func() {\n\t// No UDP stats for non-linux\n\treturn func() {}\n}\n\ntype rawMessage struct {\n\tLen uint32\n}\n\nfunc (u *GenericConn) ListenOut(r EncReader, flush func()) error {\n\tbuffer := make([]byte, MTU)","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/udp/udp_generic.go#L54-L90","documentation":"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.","triggerScenarios":"Thrown at udp/udp_generic.go:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"type-guard","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"}