Marvin
thanks: the fix is in svn.

Regards Luca

On 02/21/2013 10:12 PM, Marvin Hubertson wrote:
Hi Luca,

It turns out I was getting the errors because I have more than one interface configured.
I traced the segmentation fault down to globals-core.c
After applying the below patch, the segmentation fault stopped.
I still get the INTERNAL ERROR, but it seems to be working.

@@ -541,12 +544,10 @@
ndpi_set_protocol_detection_bitmask2(myGlobals.device[deviceId].l7.l7handler, &all);

   if(myGlobals.runningPref.protoSpecs != NULL) {
-    if(deviceId == 0)
- traceEvent(CONST_TRACE_INFO, "Loading nDPI protocol/port mapping from %s",
-                myGlobals.runningPref.protoSpecs);
-
-  ndpi_load_protocols_file(myGlobals.device[deviceId].l7.l7handler,
-  myGlobals.runningPref.protoSpecs);
+    if(deviceId == 0){
+ traceEvent(CONST_TRACE_INFO, "Loading nDPI protocol/port mapping from %s", myGlobals.runningPref.protoSpecs); + ndpi_load_protocols_file(myGlobals.device[deviceId].l7.l7handler, myGlobals.runningPref.protoSpecs);
+    }
   }
 }

Regards,
Marvin


On 16 February 2013 12:19, Luca Deri <[email protected] <mailto:[email protected]>> wrote:

    Marvin,
    I have created a file with your protocol and using both ntop (from
    SVN) and pcapReader I am not able to reproduce the bug.

    CAn you please elaborate a bit ?

    Thanks Luca

    On Feb 13, 2013, at 6:42 PM, Marvin Hubertson
    <[email protected] <mailto:[email protected]>> wrote:

    > Hi Luca,
    >
    > Thanks for the feature.
    >
    > just downloaded both NTOP and nDPI from SVN and tried to use the
    custom protocols feature.
    > Unfortunately, I get a segmentation fault:
    > [NDPI] ndpi_init_protocol_defaults(missing protoId=156) INTERNAL
    ERROR: not all protocols have been initialized
    > Segmentation fault
    >
    > my protocols file contains only one line:
    > tcp:5555,tcp:18101,tcp:18102@HP_Dataprotector
    >
    > Let me know if you need more information.
    >
    >
    >
    > On 25 January 2013 09:14, Luca Deri <[email protected]
    <mailto:[email protected]>> wrote:
    > Kurt,
    > just use the SVN code of ntop/nDPI.
    >
    > Cheers Luca
    >
    >
    >
    > On 01/23/2013 01:25 AM, Kurt Buff wrote:
    > Luca,
    >
    > I'm ntop 5.0.1 on FreeBSD 9.0-RELEASE.
    >
    > Can you point me to docs on updating the nDPI code?
    >
    > I've found the working directory in the ports tree where nDPI was
    > compiled (/usr/ports/net/ntop/work/ntop-5.0.1/nDPI, and have
    looked at
    > various documents in the tree, but don't see anything to guide me.
    >
    > Thanks,
    >
    > Kurt
    >
    > On Tue, Jan 22, 2013 at 2:44 PM, Luca Deri <[email protected]
    <mailto:[email protected]>> wrote:
    > Kurt,
    > please update the nDPI code. When you specify a custom protocol
    file, you can define new protocols using new labels, not yet defined.
    >
    > Example see
    https://svn.ntop.org/svn/ntop/trunk/nDPI/example/protos.txt
    >
    > Luca
    >
    >
    >
    > On Jan 22, 2013, at 7:49 PM, Kurt Buff <[email protected]
    <mailto:[email protected]>> wrote:
    >
    > Yes - according to /etc/services on my FreeBSD machines, iscsi uses
    > port 860 tcp/udp, and iscsi-target uses 3260 tcp/udp - I'd like to
    > differentiate that from other IP traffic on my L3 switch, where it
    > traverses one of the VLANs.
    >
    > Thanks,
    >
    > Kurt
    >
    > On Tue, Jan 22, 2013 at 7:56 AM, Luca Deri <[email protected]
    <mailto:[email protected]>> wrote:
    > Kurt
    > I need to do that, it's on my todo list. THis for protocols you
    can identify
    > by port. Is this the case of iSCSI?
    >
    > Luca
    >
    >
    > On 01/22/2013 01:12 AM, Kurt Buff wrote:
    > Quick question: The documentation talks about setting up a file
    with a
    > list of protocols with the -p parameter.
    >
    > Does setting this up override nDPI, or can I specify a file that has
    > some extra that aren't known by nDPI (such as iSCSI), and get the
    > results from both?
    >
    > Or, if I would lose the benefit of nDPI if I specify a protocols
    list,
    > can I do some sort of naive addition to nDPI to specify the
    ports for
    > {iscsi|iscsi-target}?
    >
    > Kurt
    > _______________________________________________
    > Ntop mailing list
    > [email protected] <mailto:[email protected]>
    > http://listgateway.unipi.it/mailman/listinfo/ntop
    >
    > _______________________________________________
    > Ntop mailing list
    > [email protected] <mailto:[email protected]>
    > http://listgateway.unipi.it/mailman/listinfo/ntop
    > _______________________________________________
    > Ntop mailing list
    > [email protected] <mailto:[email protected]>
    > http://listgateway.unipi.it/mailman/listinfo/ntop
    > _______________________________________________
    > Ntop mailing list
    > [email protected] <mailto:[email protected]>
    > http://listgateway.unipi.it/mailman/listinfo/ntop
    > _______________________________________________
    > Ntop mailing list
    > [email protected] <mailto:[email protected]>
    > http://listgateway.unipi.it/mailman/listinfo/ntop
    >
    > _______________________________________________
    > Ntop mailing list
    > [email protected] <mailto:[email protected]>
    > http://listgateway.unipi.it/mailman/listinfo/ntop
    >
    > _______________________________________________
    > Ntop mailing list
    > [email protected] <mailto:[email protected]>
    > http://listgateway.unipi.it/mailman/listinfo/ntop

    _______________________________________________
    Ntop mailing list
    [email protected] <mailto:[email protected]>
    http://listgateway.unipi.it/mailman/listinfo/ntop




_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to