diff --git a/conninode.cpp b/conninode.cpp index 79649a9..5a8b17b 100644 --- a/conninode.cpp +++ b/conninode.cpp @@ -35,6 +35,7 @@ #endif extern local_addr *local_addrs; +extern bool bughuntmode; /* * connection-inode table. takes information from /proc/net/tcp. * key contains source ip, source port, destination ip, destination @@ -67,8 +68,9 @@ void addtoconninode(char *buffer) { struct in6_addr in6_local; struct in6_addr in6_remote; - // this leaked memory - // unsigned long * inode = (unsigned long *) malloc (sizeof(unsigned long)); + if (bughuntmode) { + std::cout << "ci: " << buffer; + } unsigned long inode; int matches = sscanf(buffer, "%*d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %*X " diff --git a/process.cpp b/process.cpp index 8ca571a..b9844fd 100644 --- a/process.cpp +++ b/process.cpp @@ -278,7 +278,8 @@ Process *getProcess(Connection *connection, const char *devicename) { // no? refresh and check conn/inode table if (bughuntmode) { std::cout << "? new connection not in connection-to-inode table before " - "refresh.\n"; + "refresh, hash " << connection->refpacket->gethashstring() + << std::endl; } // refresh the inode->pid table first. Presumably processing the renewed // connection->inode table