Fix compiler error on mac (?)
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
#endif
|
||||
|
||||
extern local_addr * local_addrs;
|
||||
|
||||
/*
|
||||
* connection-inode table. takes information from /proc/net/tcp.
|
||||
* key contains source ip, source port, destination ip, destination
|
||||
@@ -143,12 +142,12 @@ void addtoconninode (char * buffer)
|
||||
* 172.16.3.3, packages arrive from 195.169.216.157 to 172.16.3.3, where
|
||||
* 172.16.3.1 and 195.169.216.157 are the local addresses of different
|
||||
* interfaces */
|
||||
struct local_addr * current_local_addr = local_addrs;
|
||||
while (current_local_addr != NULL) {
|
||||
for (class local_addr *current_local_addr = local_addrs;
|
||||
current_local_addr != NULL;
|
||||
current_local_addr = current_local_addr->next) {
|
||||
/* TODO maybe only add the ones with the same sa_family */
|
||||
snprintf(hashkey, HASHKEYSIZE * sizeof(char), "%s:%d-%s:%d", current_local_addr->string, local_port, remote_string, rem_port);
|
||||
conninode[hashkey] = inode;
|
||||
current_local_addr = current_local_addr->next;
|
||||
}
|
||||
free (hashkey);
|
||||
free (remote_string);
|
||||
|
||||
Reference in New Issue
Block a user