<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I'm experimenting running suricata in inline mode using IPFW divert on FreeBSD.</div><div><br></div><div>And I had many errors on the console like these:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>[100108] 22/12/2012 -- 08:59:32 - (source-ipfw.c:684) <Info> (VerdictIPFWThreadExitStats) -- IPFW Processing: - (Verdict0) Pkts accepted 4890, dropped 120</div></div><div><div>[100048] 22/12/2012 -- 08:59:32 - (tm-threads.c:2058) <Info> (TmThreadRestartThread) -- thread "Verdict0" restarted</div></div><div><div>[100108] 22/12/2012 -- 09:00:23 - (source-ipfw.c:541) <Warning> (IPFWSetVerdict) -- [ERRCODE: SC_WARN_IPFW_XMIT(84)] - Write to ipfw divert socket failed: Permission denied</div></div><div><div>[100108] 22/12/2012 -- 09:00:23 - (source-ipfw.c:684) <Info> (VerdictIPFWThreadExitStats) -- IPFW Processing: - (Verdict0) Pkts accepted 4198, dropped 113</div></div><div><div>[100048] 22/12/2012 -- 09:00:23 - (tm-threads.c:2058) <Info> (TmThreadRestartThread) -- thread "Verdict0" restarted</div></div><div><div>[100108] 22/12/2012 -- 09:00:34 - (source-ipfw.c:541) <Warning> (IPFWSetVerdict) -- [ERRCODE: SC_WARN_IPFW_XMIT(84)] - Write to ipfw divert socket failed: Permission denied</div></div><div><div>[100108] 22/12/2012 -- 09:00:34 - (source-ipfw.c:684) <Info> (VerdictIPFWThreadExitStats) -- IPFW Processing: - (Verdict0) Pkts accepted 854, dropped 23</div></div><div><div>[100048] 22/12/2012 -- 09:00:34 - (tm-threads.c:2058) <Info> (TmThreadRestartThread) -- thread "Verdict0" restarted</div></div><div><div>[100108] 22/12/2012 -- 09:00:43 - (source-ipfw.c:541) <Warning> (IPFWSetVerdict) -- [ERRCODE: SC_WARN_IPFW_XMIT(84)] - Write to ipfw divert socket failed: Permission denied</div></div><div><div>[100108] 22/12/2012 -- 09:00:43 - (source-ipfw.c:684) <Info> (VerdictIPFWThreadExitStats) -- IPFW Processing: - (Verdict0) Pkts accepted 849, dropped 27</div></div><div><div>[100048] 22/12/2012 -- 09:00:43 - (tm-threads.c:2058) <Info> (TmThreadRestartThread) -- thread "Verdict0" restarted</div></div><div><div>[100108] 22/12/2012 -- 09:01:17 - (source-ipfw.c:541) <Warning> (IPFWSetVerdict) -- [ERRCODE: SC_WARN_IPFW_XMIT(84)] - Write to ipfw divert socket failed: Permission denied</div></div><div><div>[100108] 22/12/2012 -- 09:01:17 - (source-ipfw.c:684) <Info> (VerdictIPFWThreadExitStats) -- IPFW Processing: - (Verdict0) Pkts accepted 2505, dropped 96</div></div><div><div>[100048] 22/12/2012 -- 09:01:17 - (tm-threads.c:2058) <Info> (TmThreadRestartThread) -- thread "Verdict0" restarted</div></div><div><div>[100108] 22/12/2012 -- 09:01:52 - (source-ipfw.c:541) <Warning> (IPFWSetVerdict) -- [ERRCODE: SC_WARN_IPFW_XMIT(84)] - Write to ipfw divert socket failed: Permission denied</div></div><div><div>[100108] 22/12/2012 -- 09:01:52 - (source-ipfw.c:684) <Info> (VerdictIPFWThreadExitStats) -- IPFW Processing: - (Verdict0) Pkts accepted 2626, dropped 95</div></div><div><div>[100048] 22/12/2012 -- 09:01:52 - (tm-threads.c:2058) <Info> (TmThreadRestartThread) -- thread "Verdict0" restarted</div></div><div><div>[100108] 22/12/2012 -- 09:02:48 - (source-ipfw.c:541) <Warning> (IPFWSetVerdict) -- [ERRCODE: SC_WARN_IPFW_XMIT(84)] - Write to ipfw divert socket failed: Permission denied</div></div><div><div>[100108] 22/12/2012 -- 09:02:48 - (source-ipfw.c:684) <Info> (VerdictIPFWThreadExitStats) -- IPFW Processing: - (Verdict0) Pkts accepted 4649, dropped 98</div></div><div><div>[100048] 22/12/2012 -- 09:02:48 - (tm-threads.c:2045) <Error> (TmThreadRestartThread) -- [ERRCODE: SC_ERR_TM_THREADS_ERROR(136)] - thread restarts exceeded threshold limit for thread "Verdict0"</div></div><div><br></div></blockquote>Turns out, sendto() reruns EACCESS when sending packets with broadcast address as destination without SO_BROADCAST flag set on the socket.<div>I've applied this patch and now there are no more messages like these and suricata does not crash anymore.</div><div><br></div><div></div></body></html>