xinan.tang | 1 Sep 2009 04:46
Picon
Favicon

Re: "Utility: Data Dump is broken"

What do the following two statements mean?
 
    signal(SIGALRM, quitNow);
    alarm(120); /* Don't freeze */
It will make the else branch quit execution, won't it?
 
If so, the child process will return right away and the following code will not be executed. That is what I observed.
 
--Xinan 


--- On Mon, 8/31/09, Luca Deri <deri <at> ntop.org> wrote:

From: Luca Deri <deri <at> ntop.org>
Subject: Re: [Ntop-dev] "Utility: Data Dump is broken"
To: ntop-dev <at> unipi.it, xinan.tang <at> sbcglobal.net
Date: Monday, August 31, 2009, 3:45 PM


On Aug 26, 2009, at 9:18 PM, xinan.tang <at> sbcglobal.net wrote:

> After several-day hacking, I finally make the Data Dump working again. The version based is 3.3.10.
>
> First,  here is deadcode in http.c starting at line 2681,  the parent will return(0) in the then branch and the child will quit (signal(SIGALRM, quitNow)) in the else branch.  Therefore,  the nested strncasecmp() after that will NEVER be executed, and thus actual function of CONST_DUMP_DATA_HTML will not be executed.
>
> What is the purpose to have such kind of dead code?

I don't see any dead code. Can you please explain?

Luca

>
> Thanks
>
> --Xinan
>
>
>
> -----------------
> else {
>         *usedFork = 1;
>         /* This is zero in the parent copy of the structure */
>         if(myGlobals.childntoppid) {
>           /* father process */
>           myGlobals.numChildren++;
>           compressFile = 0;
>           if(domainNameParm != NULL) free(domainNameParm);
>           if(db_key != NULL) free(db_key);
>           if(db_val != NULL) free(db_val);
>           return(0);
>         } else {
>           detachFromTerminalUnderUnix(0);
>           /* Close inherited sockets */
> #ifdef HAVE_OPENSSL
>           if(myGlobals.sslInitialized) closeNwSocket(&myGlobals.sock_ssl);
> #endif /* HAVE_OPENSSL */
>           if(myGlobals.runningPref.webPort > 0) closeNwSocket(&myGlobals.sock);
> //!#if defined(HAVE_ALARM) && defined(PARM_FORK_CHILD_PROCESS) && (!defined(WIN32))
>           signal(SIGALRM, quitNow);
>           alarm(120); /* Don't freeze */
>         }
>       }
> --------------------------------------------------
> _______________________________________________
> Ntop-dev mailing list
> Ntop-dev <at> unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev

_______________________________________________
Ntop-dev mailing list
Ntop-dev <at> unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
Luca Deri | 1 Sep 2009 15:25

Re: "Utility: Data Dump is broken"


On Sep 1, 2009, at 4:46 AM, xinan.tang <at> sbcglobal.net wrote:

> What do the following two statements mean?
>
>     signal(SIGALRM, quitNow);
>     alarm(120); /* Don't freeze */
> It will make the else branch quit execution, won't it?
>
> If so, the child process will return right away and the following  
> code will not be executed. That is what I observed.

the child will quit if not able to provide a reply within 2 minutes

Luca

>
> --Xinan
>
>
> --- On Mon, 8/31/09, Luca Deri <deri <at> ntop.org> wrote:
>
> From: Luca Deri <deri <at> ntop.org>
> Subject: Re: [Ntop-dev] "Utility: Data Dump is broken"
> To: ntop-dev <at> unipi.it, xinan.tang <at> sbcglobal.net
> Date: Monday, August 31, 2009, 3:45 PM
>
>
> On Aug 26, 2009, at 9:18 PM, xinan.tang <at> sbcglobal.net wrote:
>
> > After several-day hacking, I finally make the Data Dump working  
> again. The version based is 3.3.10.
> >
> > First,  here is deadcode in http.c starting at line 2681,  the  
> parent will return(0) in the then branch and the child will quit  
> (signal(SIGALRM, quitNow)) in the else branch.  Therefore,  the  
> nested strncasecmp() after that will NEVER be executed, and thus  
> actual function of CONST_DUMP_DATA_HTML will not be executed.
> >
> > What is the purpose to have such kind of dead code?
>
> I don't see any dead code. Can you please explain?
>
> Luca
>
> >
> > Thanks
> >
> > --Xinan
> >
> >
> >
> > -----------------
> > else {
> >         *usedFork = 1;
> >         /* This is zero in the parent copy of the structure */
> >         if(myGlobals.childntoppid) {
> >           /* father process */
> >           myGlobals.numChildren++;
> >           compressFile = 0;
> >           if(domainNameParm != NULL) free(domainNameParm);
> >           if(db_key != NULL) free(db_key);
> >           if(db_val != NULL) free(db_val);
> >           return(0);
> >         } else {
> >           detachFromTerminalUnderUnix(0);
> >           /* Close inherited sockets */
> > #ifdef HAVE_OPENSSL
> >           if(myGlobals.sslInitialized) closeNwSocket 
> (&myGlobals.sock_ssl);
> > #endif /* HAVE_OPENSSL */
> >           if(myGlobals.runningPref.webPort > 0) closeNwSocket 
> (&myGlobals.sock);
> > //!#if defined(HAVE_ALARM) && defined(PARM_FORK_CHILD_PROCESS) &&  
> (!defined(WIN32))
> >           signal(SIGALRM, quitNow);
> >           alarm(120); /* Don't freeze */
> >         }
> >       }
> > --------------------------------------------------
> > _______________________________________________
> > Ntop-dev mailing list
> > Ntop-dev <at> unipi.it
> > http://listgateway.unipi.it/mailman/listinfo/ntop-dev
>
svn-commit | 2 Sep 2009 14:30

r3867 - branches/andrews/n2n_v2_edge

Author: andrews
Date: 2009-09-02 14:30:24 +0200 (Wed, 02 Sep 2009)
New Revision: 3867

Added:
   branches/andrews/n2n_v2_edge/n2n_transforms.h
   branches/andrews/n2n_v2_edge/transform_tf.c
Modified:
   branches/andrews/n2n_v2_edge/Makefile
   branches/andrews/n2n_v2_edge/edge.c
Log:
n2n_v2 edge: rearrange crypto transform organisation. Preparations for time-overlapping security
associations and specifying a key-schedule.
svn-commit | 2 Sep 2009 15:33

r3868 - branches/andrews/n2n_v2_edge

Author: andrews
Date: 2009-09-02 15:33:44 +0200 (Wed, 02 Sep 2009)
New Revision: 3868

Modified:
   branches/andrews/n2n_v2_edge/edge.c
   branches/andrews/n2n_v2_edge/keyctrl.conf
   branches/andrews/n2n_v2_edge/n2n_keyfile.c
   branches/andrews/n2n_v2_edge/n2n_keyfile.h
   branches/andrews/n2n_v2_edge/test.c
   branches/andrews/n2n_v2_edge/transform_tf.c
Log:
n2n_v2 : changes to key schedule file parsing.
ROB POWELL | 2 Sep 2009 18:02

(no subject)

Wonder if anyone can help I'm getting the following error a lot with a new NTOP build
 
error traversing Database for ipnum = xxxxxxxxxxx
 
installed versions
 
NTOP 3.3.10 (svn)
 
LIBEVENT 1.4.12-stable
 
OS Ubuntu Server 9.04
_______________________________________________
Ntop-dev mailing list
Ntop-dev <at> unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
ROB POWELL | 2 Sep 2009 18:02

error traversing Database for ipnum

Wonder if anyone can help I'm getting the following error a lot with a new NTOP build
 
error traversing Database for ipnum = xxxxxxxxxxx
 
installed versions
 
NTOP 3.3.10 (svn)
 
LIBEVENT 1.4.12-stable
 
OS Ubuntu Server 9.04
_______________________________________________
Ntop-dev mailing list
Ntop-dev <at> unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
Luca Deri | 2 Sep 2009 18:42

Re: error traversing Database for ipnum

please update to the latest svn code

Luca

On Sep 2, 2009, at 6:02 PM, ROB POWELL wrote:

> Wonder if anyone can help I'm getting the following error a lot with  
> a new NTOP build
>
> error traversing Database for ipnum = xxxxxxxxxxx
>
> installed versions
>
> NTOP 3.3.10 (svn)
>
> LIBEVENT 1.4.12-stable
>
> OS Ubuntu Server 9.04
> _______________________________________________
> Ntop-dev mailing list
> Ntop-dev <at> unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev
ROB POWELL | 3 Sep 2009 10:59

Re: error traversing Database for ipnum

Updated to latest SVN this morning and still getting same db traversing error?

From: Luca Deri <deri <at> ntop.org>
To: ntop-dev <at> unipi.it
Sent: Wednesday, 2 September, 2009 5:42:24 PM
Subject: Re: [Ntop-dev] error traversing Database for ipnum

please update to the latest svn code

Luca

On Sep 2, 2009, at 6:02 PM, ROB POWELL wrote:

> Wonder if anyone can help I'm getting the following error a lot with 
> a new NTOP build
>
> error traversing Database for ipnum = xxxxxxxxxxx
>
> installed versions
>
> NTOP 3.3.10 (svn)
>
> LIBEVENT 1.4.12-stable
>
> OS Ubuntu Server 9.04
> _______________________________________________
> Ntop-dev mailing list
> Ntop-dev <at> unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev

_______________________________________________
Ntop-dev mailing list
Ntop-dev <at> unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
_______________________________________________
Ntop-dev mailing list
Ntop-dev <at> unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
svn-commit | 3 Sep 2009 15:36

r3869 - branches/andrews/n2n_v2_edge

Author: andrews
Date: 2009-09-03 15:36:51 +0200 (Thu, 03 Sep 2009)
New Revision: 3869

Modified:
   branches/andrews/n2n_v2_edge/Makefile
   branches/andrews/n2n_v2_edge/edge.c
   branches/andrews/n2n_v2_edge/keyctrl.conf
   branches/andrews/n2n_v2_edge/n2n_keyfile.c
   branches/andrews/n2n_v2_edge/n2n_keyfile.h
   branches/andrews/n2n_v2_edge/n2n_transforms.h
   branches/andrews/n2n_v2_edge/test.c
   branches/andrews/n2n_v2_edge/transform_tf.c
Log:
n2n_v2 edge can now also use key control file to specify keys and SA numbers. Interoperability confirmed
with previous generation using single key.
svn-commit | 4 Sep 2009 14:29

r3870 - branches/andrews/n2n_v2_edge

Author: andrews
Date: 2009-09-04 14:29:59 +0200 (Fri, 04 Sep 2009)
New Revision: 3870

Added:
   branches/andrews/n2n_v2_edge/transform_null.c
Modified:
   branches/andrews/n2n_v2_edge/Makefile
   branches/andrews/n2n_v2_edge/edge.c
   branches/andrews/n2n_v2_edge/n2n_transforms.h
   branches/andrews/n2n_v2_edge/transform_tf.c
Log:
n2n_v2: edge can switch between NULL and twofish transforms on Tx and distinguish by transform ID on Rx.

Gmane