{"record":{"id":"21eb8c7141760ffa","repo":"probelabs/goreplay","slug":"sock-raw-is-not-stabilized-on-os-other-than-linux","errorCode":null,"errorMessage":"sock_raw is not stabilized on OS other than linux","messagePattern":"sock_raw is not stabilized on OS other than linux","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/capture/capture.go","lineNumber":656,"sourceCode":"\t}\n\treturn nil\n}\n\nfunc (l *Listener) activateVxLanSocket() error {\n\thandler, err := newVXLANHandler(l.config.VXLANPort, l.config.VXLANVNIs)\n\tif err != nil {\n\t\treturn err\n\t}\n\tl.Handles[\"vxlan\"] = packetHandle{\n\t\thandler: handler,\n\t}\n\n\treturn nil\n}\n\nfunc (l *Listener) activateRawSocket() error {\n\tif runtime.GOOS != \"linux\" {\n\t\treturn fmt.Errorf(\"sock_raw is not stabilized on OS other than linux\")\n\t}\n\tvar msg string\n\tvar e error\n\tfor _, ifi := range l.Interfaces {\n\t\tif _, found := l.Handles[ifi.Name]; found {\n\t\t\tcontinue\n\t\t}\n\n\t\tvar handle Socket\n\t\thandle, e = l.SocketHandle(ifi)\n\t\tif e != nil {\n\t\t\tmsg += (\"\\n\" + e.Error())\n\t\t\tcontinue\n\t\t}\n\t\tl.Handles[ifi.Name] = packetHandle{\n\t\t\thandler: handle,\n\t\t\tips:     interfaceIPs(ifi),\n\t\t}","sourceCodeStart":638,"sourceCodeEnd":674,"githubUrl":"https://github.com/probelabs/goreplay/blob/251e45abd242886bb64ff2b2dc98789556b56330/internal/capture/capture.go#L638-L674","documentation":"Explicit platform guard in activateRawSocket: sock_raw capture is only considered stable on Linux, so on any other GOOS it returns this error before attempting to open sockets, instead of risking unreliable behavior.","triggerScenarios":"Thrown at internal/capture/capture.go:656 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the raw-socket listener on Linux","Use pcap-based capture (--input-raw without raw socket engine) on other OSes","Don't enable sock_raw mode in non-Linux deployments"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"251e45abd242886bb64ff2b2dc98789556b56330","analyzedAt":"2026-09-02T16:44:11.369Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}