Please post what I asked for... otherwise you're wasting both our time... libpcap 0.6 is pretty old - 0.7.something is the current version. The 7 series goes back to October 2001...
Maybe you don't know how to use gdb, so let's give it in baby food steps: After it gives you the (gdb) prompt, (gdb) frame 2 (That points us back to the block of code in admin.c)(See the #1, #2, etc in the info stack output? Those are the frames) (gdb) print myGlobals.currentFilterExpression (That will show what you're trying to set the filter to) (gdb) print myGlobals.device[0].virtualDevice (gdb) print myGlobals.device[1].virtualDevice (That will show if this is the 1st call to pcap_compile() or the second) (gdb) print myGlobals.device[i].pcapPtr (gdb) print fcode (gdb) print nyGlobals.device[i].netmask.s_addr etc. My hypothesis is that the filter expression you're asking ntop to compile is illegal or corrupted or has extra quotes. Something wrong with it... After you find out what it is, you can always use tcpdump to test the specific expression. -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:ntop-admin@;unipi.it]On Behalf Of Martin Hierling Sent: Friday, November 01, 2002 9:48 AM To: [EMAIL PROTECTED] Subject: Re: [Ntop] Sig 11 when changing Filter Hello, > Martin, I don't know how you're capturing this, but it's all but impossible > to read w/o the line breaks... with script, have seen the mail is a mess, sorry. > What I see is this: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 6151 (LWP 9821)] 0x40275f72 in pcap_snapshot () from > /home/martin/temp/ntop-cvs/ntop/.libs/libntop-2.1.so.52 > > and > > #0 0x40275f72 in pcap_snapshot () from > /home/martin/temp/ntop-cvs/ntop/.libs/libntop-2.1.so.52 No symbol table info > available. > > #1 0x40276969 in pcap_compile () from > /home/martin/temp/ntop-cvs/ntop/.libs/libntop-2.1.so.52 No symbol table info > available. > > #2 0x0804d005 in doChangeFilter (len=26) at admin.c:637 > len = 1076605344 > i = 1 > idx = 26 > badChar = 0 > fcode = {bf_len = 14, bf_insns = 0x861ae58} > currentFilterExpressionSav = 0x8462858 "" > buf = "<B>\000... > postData = "filter\000host+193.16.118.209", '\000' <repeats 229 times> > key = 0xbedfe95c "\016" > err = 0x0 > > So, questions: > > 1. It dies when you change the pcap filter, correct? Yes. At the moment i press the submit button. > > 2. What version of libpcap and where did you get it? It is a SuSE8.0 with libpcap-0.6.2-202 > > 3. Using gdb do some prints so we can see what you're changing it TO. Also, > I guess it would be useful to see the values of the other variables in that > piece of code: > > for(i=0; i<myGlobals.numDevices; i++) { > if((!myGlobals.device[i].virtualDevice)&&(err==NULL)) { > if((pcap_compile(myGlobals.device[i].pcapPtr, &fcode, > myGlobals.currentFilterExpression, 1, > myGlobals.device[i].netmask.s_addr) < 0) > > (gdb) print i > (gdb) print myGlobals.device[i].virtualDevice > (gdb) print myGlobals.currentFilterExpression > (gdb) myGlobals.device[i].netmask.s_addr > Sorry, but in all my next debuggings i didnot see this "for i" loop. Have made some Logs available at http://www.fh-lippe.de/~mad/debug_3.txt http://www.fh-lippe.de/~mad/debug_4.txt http://www.fh-lippe.de/~mad/debug_5.txt Have the same behaviour with the stable version also. thats it, nice weekend regards Martin > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:ntop-admin@;unipi.it]On Behalf Of > > Martin Hierling > > Sent: Thursday, October 24, 2002 3:44 AM > > To: NTop Liste > > Subject: [Ntop] Sig 11 when changing Filter > > > > > > Hi, > > > > when i try to change a filter with the browser i get sig11 ;-( (not really > > me, but ntop). It happens with stable and CVS version. > > > > 24/Oct/2002 10:37:35 Changing the kernel (libpcap) filter... > > 24/Oct/2002 10:37:35 Set filter "host 193.16.xxx.xxx" on myGlobals.device > > lo. > > 24/Oct/2002 10:37:35 ntop caught signal 11 > > 24/Oct/2002 10:37:35 > > > > *****ntop error: Signal(11) > > 24/Oct/2002 10:37:35 > > backtrace is: > > 24/Oct/2002 10:37:35 1. /lib/libpthread.so.0 [0x404b3a74] > > 24/Oct/2002 10:37:35 2. /lib/libc.so.6 [0x40515a38] > > 24/Oct/2002 10:37:35 3. > > /home/martin/temp/ntop-cvs/ntop/.libs/libntop-2.1.so.52(pcap_compile+0x7d) > > [0x40276969] > > 24/Oct/2002 10:37:35 4. lt-ntop(doChangeFilter+0x325) > [0x804d005] > > 24/Oct/2002 10:37:35 5. > > /home/martin/temp/ntop-cvs/ntop/.libs/libntopreport-2.1.so.52 [0x40040152] > > 24/Oct/2002 10:37:35 6. > > > /home/martin/temp/ntop-cvs/ntop/.libs/libntopreport-2.1.so.52(handleHTTPrequ > > est+0x270) [0x40042e40] > > 24/Oct/2002 10:37:35 7. > > /home/martin/temp/ntop-cvs/ntop/.libs/libntopreport-2.1.so.52 [0x4006e5ed] > > 24/Oct/2002 10:37:35 8. > > > /home/martin/temp/ntop-cvs/ntop/.libs/libntopreport-2.1.so.52(handleWebConne > > ctions+0x205) [0x4006e2d5] > > 24/Oct/2002 10:37:35 9. /lib/libpthread.so.0 [0x404b0e67] > > 24/Oct/2002 10:37:35 10. /lib/libc.so.6(__clone+0x3a) > [0x405be72a] > > 24/Oct/2002 10:37:35 Cleaning up... > > 24/Oct/2002 10:37:35 Waiting until threads terminate... > > 24/Oct/2002 10:37:36 Received NetFlow packet (len=1464) (deviceId=1) > > 24/Oct/2002 10:37:39 Freeing hash host instances... (2 device(s) to save) > > 24/Oct/2002 10:37:39 326 instances freed > > 24/Oct/2002 10:37:39 Freeing hash host instances... (2 device(s) to save) > > 24/Oct/2002 10:37:39 0 instances freed > > 24/Oct/2002 10:37:39 Unloading plugins (if any)... > > 24/Oct/2002 10:37:39 Thanks for using icmpWatch... > > 24/Oct/2002 10:37:39 Done. > > 24/Oct/2002 10:37:39 Thanks for using PDAWatch... > > 24/Oct/2002 10:37:39 Done. > > 24/Oct/2002 10:37:39 Thanks for using ntop NetFlow > > 24/Oct/2002 10:37:39 Done. > > 24/Oct/2002 10:37:39 Cisco NetFlow exporter terminated. > > > > > > I am starting with: > > ./ntop --local-subnets "193.16.112.0/255.255.240.0" -K --user > > martin --interface lo --trace-level 3 -w 127.0.0.1:3000 > > > > only to mention it. > > > > regards Martin > > > > -- _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop
