[Oisf-users] Thread naming string size src/util-runmodes.c

Tritium Cat tritium.cat at gmail.com
Thu Aug 29 03:10:41 UTC 2013

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.

Noticed that the thread name buffer size is inconsistent among the various
RunModeSetLiveCapture* functions.

Is there anything wrong with standardizing this buffer size to >= 16
characters ?


int RunModeSetLiveCaptureAutoFp(DetectEngineCtx *de_ctx,
                              ConfigIfaceParserFunc ConfigParser,
                              ConfigIfaceThreadsCountFunc ModThreadsCount,
                              char *recv_mod_name,
                              char *decode_mod_name, char *thread_name,
                              const char *live_dev)
    char tname[12];   // <<<<<<<< thread name buffer
    char qname[12];
    char queues[2048] = "";
    int thread;


src/util-runmodes.c:50:int RunModeSetLiveCaptureAuto(DetectEngineCtx
src/util-runmodes.c:289:int RunModeSetLiveCaptureAutoFp(DetectEngineCtx
src/util-runmodes.c:502:static int
RunModeSetLiveCaptureWorkersForDevice(DetectEngineCtx *de_ctx,
src/util-runmodes.c:595:int RunModeSetLiveCaptureWorkers(DetectEngineCtx
src/util-runmodes.c:632:int RunModeSetLiveCaptureSingle(DetectEngineCtx


$ grep "char tname" suricata-2.0beta1/src/util-runmodes.c
    char tname[16];
    char tname[24];   <<<<<<<<< Modified
        char tname[20];
    char tname[16];
    char tname[16];
    char tname[16];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openinfosecfoundation.org/pipermail/oisf-users/attachments/20130828/9cab2b5a/attachment.html>

More information about the Oisf-users mailing list