Luca: --- globals-core.c 23 Jul 2003 11:07:30 -0000 2.83 +++ globals-core.c 23 Jul 2003 12:01:04 -0000 2.84 @@ -98,8 +98,8 @@ initSingleGdbm(&myGlobals.pwFile, "ntop_pw.db", prefDirectory, FALSE, NULL);
if(initPrefsOnly) return; - initSingleGdbm(&myGlobals.addressQueueFile, "addressQueue.db", spoolDirectory, TRUE, NULL); - initSingleGdbm(&myGlobals.dnsCacheFile, "dnsCache.db", spoolDirectory, TRUE, NULL); + initSingleGdbm(&myGlobals.addressQueueFile, "addressQueue.db", spoolDirectory, FALSE, NULL); + initSingleGdbm(&myGlobals.dnsCacheFile, "dnsCache.db", spoolDirectory, FALSE, NULL); initSingleGdbm(&myGlobals.hostsInfoFile, "hostsInfo.db", spoolDirectory, FALSE, NULL); initSingleGdbm(&myGlobals.macPrefixFile, "macPrefix.db", spoolDirectory, FALSE, &statbuf); createVendorTable(&statbuf); Two questions. 1) WRT to dnsCache - wouldn't it be better to stat the files and delete them if they're more than say 15 minutes old? That way, a simple restart doesn't lose the information, but a system where ntop is run only infrequently doesn't preserve really old information. 2) WRT to addressQueue - unless the queued host is really, really busy, there's a significant risk of resolving the queued host before there's a host entry to receive the information. Which wastes effort. Also, the (address.c) decrement, myGlobals.addressQueuedCurrent--; isn't conditional, nor is the value initialzed to the # of records in the queue, so the stats will be wrong. Given that, and the reality that the queue file is usually empty, I'd strongly recommend reverting this part of the fix... See attached .patch file! -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 7:01 AM To: [EMAIL PROTECTED] Subject: [Ntop-dev] New ntop commit (author deri) Update of /export/home/ntop/ntop In directory jabber:/tmp/cvs-serv14085 Modified Files: globals-core.c Log Message: Cache files are no longer deleted at ntop startup _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop-dev
BMS0308-dnscacheage.patch
Description: Binary data
