Vilius Sumskas | 1 Feb 2004 11:33
Picon
Favicon

zlib problems?

Hi,

i recently installed newest cvs (2004-01-31). It seems that problem
with gz files is back again.

**WARNING** OSFP: Unable to open file 'etter.passive.os.fp'
ASN: Checking for Autonomous System Number table file
**WARNING** ASN: Unable to open file 'AS-list.txt'
IP2CC: Looking for IP address <-> Country code mapping file
IP2CC: Checking for IP address <-> Country Code mapping file
**WARNING** IP2CC: Unable to open file 'p2c.opt.table'

Chmoding, chowning and other stuff doesn't help. ./configure
--without-zlib options doesn't help too. However, seems that gzflush
error is gone.

--

-- 
Best regards,
 Vilius
Vilius Sumskas | 1 Feb 2004 11:37
Picon
Favicon

ntop doesn't show any images

Hi,

ntop doesn't show any images. I configured with usual parameters, and
nothing changed on the system since last configuration a week ago
which worked fine. I thought maybe it has something to do with new GD
version check ?

--

-- 
Best regards,
 Vilius
Meloun Michal | 1 Feb 2004 11:56
Picon

BUG - Segmentation faults wher reading .gz files (util.c)

See patch.
 Michal Meloun

--- util.c.orig	Sun Feb  1 11:17:35 2004
+++ util.c	Sun Feb  1 11:18:21 2004
 <at>  <at>  -5520,7 +5520,7  <at>  <at> 
   for(idx=0; myGlobals.configFileDirs[idx] != NULL; idx++) {

 #ifdef MAKE_WITH_ZLIB
-      compressedFormat = 1;
+      *compressedFormat = 1;
       snprintf(tmpFile, sizeof(tmpFile), "%s/%s.gz", myGlobals.configFileDirs[idx], fileName);
       if(logTag != NULL) traceEvent(CONST_TRACE_NOISY, "%s: Checking '%s'", logTag, tmpFile);
       fd = gzopen(tmpFile, "r");
 <at>  <at>  -5528,7 +5528,7  <at>  <at> 
 #endif

       if(fd == NULL) {
-	compressedFormat = 0;
+	*compressedFormat = 0;
 	snprintf(tmpFile, sizeof(tmpFile), "%s/%s", myGlobals.configFileDirs[idx], fileName);
         if(logTag != NULL) traceEvent(CONST_TRACE_NOISY, "%s: Checking '%s'", logTag, tmpFile);
 	fd = fopen(tmpFile, "r");
 <at>  <at>  -5558,7 +5558,7  <at>  <at> 
                        "%s: File '%s' does not need to be reloaded",
                        logTag, tmpFile);
 #ifdef MAKE_WITH_ZLIB
-          if(compressedFormat)
+          if(*compressedFormat)
             gzclose(fd);
(Continue reading)

Meloun Michal | 1 Feb 2004 11:59
Picon

BUG: Bar URLs "received" and "send" filters

See patch
Michal Meloun

--- globals-defines.h.orig	Sun Feb  1 11:35:40 2004
+++ globals-defines.h	Sun Feb  1 11:39:51 2004
 <at>  <at>  -1104,12 +1104,12  <at>  <at> 
 #define CONST_SHUTDOWN_NTOP_HTML            "shutdown.html"
 #define CONST_SORT_DATA_IP_HTML             "sortDataIP.html"
 #define CONST_SORT_DATA_PROTOS_HTML         "sortDataProtos.html"
-#define CONST_SORT_DATA_RECEIVED_IP_HTML    "sortDataReceivedIP.html"
-#define CONST_SORT_DATA_RECEIVED_PROTOS_HTML "sortDataReceivedProtos.html"
-#define CONST_SORT_DATA_RECEIVED_THPT_HTML  "sortDataReceivedThpt.html"
-#define CONST_SORT_DATA_SENT_IP_HTML        "sortDataSentIP.html"
-#define CONST_SORT_DATA_SENT_PROTOS_HTML    "sortDataSentProtos.html"
-#define CONST_SORT_DATA_SENT_THPT_HTML      "sortDataSentThpt.html"
+#define CONST_SORT_DATA_RECEIVED_IP_HTML    "sortDataIP.html"
+#define CONST_SORT_DATA_RECEIVED_PROTOS_HTML "sortDataProtos.html"
+#define CONST_SORT_DATA_RECEIVED_THPT_HTML  "sortDataThpt.html"
+#define CONST_SORT_DATA_SENT_IP_HTML        "sortDataIP.html"
+#define CONST_SORT_DATA_SENT_PROTOS_HTML    "sortDataProtos.html"
+#define CONST_SORT_DATA_SENT_THPT_HTML      "sortDataThpt.html"
 #define CONST_SORT_DATA_THPT_HTML           "sortDataThpt.html"
 #define CONST_SWITCH_NIC_HTML               "switch.html"
 #define CONST_TEXT_INFO_NTOP_HTML           "textinfo.html"
Michal Meloun | 1 Feb 2004 11:30
Picon

BUG: Pointer misuse in util.c:checkForInputFile()

see patch
--- util.c.orig	Sun Feb  1 11:17:35 2004
+++ util.c	Sun Feb  1 11:18:21 2004
 <at>  <at>  -5520,7 +5520,7  <at>  <at> 
   for(idx=0; myGlobals.configFileDirs[idx] != NULL; idx++) {

 #ifdef MAKE_WITH_ZLIB
-      compressedFormat = 1;
+      *compressedFormat = 1;
       snprintf(tmpFile, sizeof(tmpFile), "%s/%s.gz", myGlobals.configFileDirs
[idx], fileName);
       if(logTag != NULL) traceEvent(CONST_TRACE_NOISY, "%s: Checking '%s'", 
logTag, tmpFile);
       fd = gzopen(tmpFile, "r");
 <at>  <at>  -5528,7 +5528,7  <at>  <at> 
 #endif

       if(fd == NULL) {
-	compressedFormat = 0;
+	*compressedFormat = 0;
 	snprintf(tmpFile, sizeof(tmpFile), "%s/%s", myGlobals.configFileDirs
[idx], fileName);
         if(logTag != NULL) traceEvent(CONST_TRACE_NOISY, "%s: Checking '%s'", 
logTag, tmpFile);
 	fd = fopen(tmpFile, "r");
 <at>  <at>  -5558,7 +5558,7  <at>  <at> 
                        "%s: File '%s' does not need to be reloaded",
                        logTag, tmpFile);
 #ifdef MAKE_WITH_ZLIB
-          if(compressedFormat)
(Continue reading)

Burton M. Strauss III | 1 Feb 2004 14:54

RE: zlib problems?

Normally, ntop looks for a file named xxxx.gz then an uncompressed file
named xxxx.

We distribute only the .gz files.

If you make --without-zlib, you need to give ntop the files it's looking
for, probably by manually running gunzip on the installed data files.

-----Burton

> -----Original Message-----
> From: ntop-dev-admin <at> unipi.it [mailto:ntop-dev-admin <at> unipi.it]On Behalf
> Of Vilius Sumskas
> Sent: Sunday, February 01, 2004 4:34 AM
> To: ntop-dev <at> Unipi.IT
> Subject: [Ntop-dev] zlib problems?
>
>
> Hi,
>
> i recently installed newest cvs (2004-01-31). It seems that problem
> with gz files is back again.
>
> **WARNING** OSFP: Unable to open file 'etter.passive.os.fp'
> ASN: Checking for Autonomous System Number table file
> **WARNING** ASN: Unable to open file 'AS-list.txt'
> IP2CC: Looking for IP address <-> Country code mapping file
> IP2CC: Checking for IP address <-> Country Code mapping file
> **WARNING** IP2CC: Unable to open file 'p2c.opt.table'
>
(Continue reading)

Burton M. Strauss III | 1 Feb 2004 14:54

RE: BUG - Segmentation faults wher reading .gz files (util.c)

Yeah - already got that one, in among a lot of little stuff found by
valgrind that I'm just about to commit.

But thanks!

-----Burton

> -----Original Message-----
> From: ntop-dev-admin <at> unipi.it [mailto:ntop-dev-admin <at> unipi.it]On Behalf
> Of Meloun Michal
> Sent: Sunday, February 01, 2004 4:56 AM
> To: ntop-dev <at> Unipi.IT
> Subject: [Ntop-dev] BUG - Segmentation faults wher reading .gz files
> (util.c)
>
>
> See patch.
>  Michal Meloun
>
>
> --- util.c.orig	Sun Feb  1 11:17:35 2004
> +++ util.c	Sun Feb  1 11:18:21 2004
>  <at>  <at>  -5520,7 +5520,7  <at>  <at> 
>    for(idx=0; myGlobals.configFileDirs[idx] != NULL; idx++) {
>
>  #ifdef MAKE_WITH_ZLIB
> -      compressedFormat = 1;
> +      *compressedFormat = 1;
>        snprintf(tmpFile, sizeof(tmpFile), "%s/%s.gz",
> myGlobals.configFileDirs[idx], fileName);
(Continue reading)

Burton M. Strauss III | 1 Feb 2004 14:54

RE: BUG: Pointer misuse in util.c:checkForInputFile()

I don't think so...  If you look at the prototypes, the check() routine is
passed compressedFormat as a pointer so it can be set and thus check() does
need the *s, but the read() routine is passed the result from check() as a
normal int and does not.

-----Burton

> -----Original Message-----
> From: ntop-dev-admin <at> unipi.it [mailto:ntop-dev-admin <at> unipi.it]On Behalf
> Of Michal Meloun
> Sent: Sunday, February 01, 2004 4:30 AM
> To: ntop-dev <at> Unipi.IT
> Subject: [Ntop-dev] BUG: Pointer misuse in util.c:checkForInputFile()
>
>
> see patch
> --- util.c.orig	Sun Feb  1 11:17:35 2004
> +++ util.c	Sun Feb  1 11:18:21 2004
>  <at>  <at>  -5520,7 +5520,7  <at>  <at> 
>    for(idx=0; myGlobals.configFileDirs[idx] != NULL; idx++) {
>
>  #ifdef MAKE_WITH_ZLIB
> -      compressedFormat = 1;
> +      *compressedFormat = 1;
>        snprintf(tmpFile, sizeof(tmpFile), "%s/%s.gz",
> myGlobals.configFileDirs
> [idx], fileName);
>        if(logTag != NULL) traceEvent(CONST_TRACE_NOISY, "%s:
> Checking '%s'",
> logTag, tmpFile);
(Continue reading)

Burton M. Strauss III | 1 Feb 2004 14:54

RE: ntop doesn't show any images

Like I remember your system, among the 100s I've seen posted?

Please file a proper bug report using the PR form

-----Burton

> -----Original Message-----
> From: ntop-dev-admin <at> unipi.it [mailto:ntop-dev-admin <at> unipi.it]On Behalf
> Of Vilius Sumskas
> Sent: Sunday, February 01, 2004 4:38 AM
> To: ntop-dev <at> Unipi.IT
> Subject: [Ntop-dev] ntop doesn't show any images
> 
> 
> Hi,
> 
> ntop doesn't show any images. I configured with usual parameters, and
> nothing changed on the system since last configuration a week ago
> which worked fine. I thought maybe it has something to do with new GD
> version check ?
> 
> -- 
> Best regards,
>  Vilius
> 
> _______________________________________________
> Ntop-dev mailing list
> Ntop-dev <at> unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev
> 
(Continue reading)

cvs-commit | 1 Feb 2004 15:03

New ntop commit (author burton)

Update of /export/home/ntop/ntop
In directory unknown:/tmp/cvs-serv22813

Modified Files:
	address.c graph.c hash.c http.c initialize.c util.c 
	webInterface.c 
Log Message:
BMS0431

Various small things found running valgrind.

Includes the *compressedFormat fix in checkForInputFile(), also found by
Michal Meloun [meloun <at> miracle.cz].

And a fix in the bind to logic for IPv6 in webInterface.c.

-----Burton

Gmane