<div dir="ltr"><div>If you use PF_RING DNA with AutoFP the interface name exceeds the 12 character buffer allocated for the thread name and seems to cause all threads to overwrite each other resulting in a single capture thread.</div>
<div><br></div><div>Noticed that the thread name buffer size is inconsistent among the various RunModeSetLiveCapture* functions.</div><div><div><div><br></div><div>Is there anything wrong with standardizing this buffer size to >= 16 characters ?</div>
<div><br></div><div>--TC</div><div><br><div><br></div><div><div>int RunModeSetLiveCaptureAutoFp(DetectEngineCtx *de_ctx,</div><div> ConfigIfaceParserFunc ConfigParser,</div><div> ConfigIfaceThreadsCountFunc ModThreadsCount,</div>
<div> char *recv_mod_name,</div><div> char *decode_mod_name, char *thread_name,</div><div> const char *live_dev)</div><div>{</div><div>
char tname[12]; // <<<<<<<< thread name buffer </div><div> char qname[12];</div><div> char queues[2048] = "";</div><div> int thread;</div></div><div><br></div></div></div></div>
<div><br></div><div>Functions:</div><div><br></div><div><div>src/util-runmodes.c:50:int RunModeSetLiveCaptureAuto(DetectEngineCtx *de_ctx,</div><div>src/util-runmodes.c:289:int RunModeSetLiveCaptureAutoFp(DetectEngineCtx *de_ctx,</div>
<div>src/util-runmodes.c:502:static int RunModeSetLiveCaptureWorkersForDevice(DetectEngineCtx *de_ctx,</div><div>src/util-runmodes.c:595:int RunModeSetLiveCaptureWorkers(DetectEngineCtx *de_ctx,</div><div>src/util-runmodes.c:619: RunModeSetLiveCaptureWorkersForDevice(de_ctx,</div>
<div>src/util-runmodes.c:632:int RunModeSetLiveCaptureSingle(DetectEngineCtx *de_ctx,</div></div><div><br></div><div><br></div><div>Inconsistencies:</div><div><br></div><div><div>$ grep "char tname" suricata-2.0beta1/src/util-runmodes.c</div>
<div> char tname[16];</div><div> char tname[24]; <<<<<<<<< Modified </div><div> char tname[20];</div><div> char tname[16];</div><div> char tname[16];</div><div> char tname[16];</div>
</div><div><br></div></div>