Fixed a bug in the known-hosts script.

This commit is contained in:
Seth Hall 2011-10-07 04:48:51 -04:00
parent 1dd3ba7f7d
commit a3e91c5b33

View file

@ -43,7 +43,10 @@ event connection_established(c: connection) &priority=5
for ( host in set(id$orig_h, id$resp_h) )
{
if ( host !in known_hosts && addr_matches_host(host, host_tracking) )
if ( host !in known_hosts &&
c$orig$state == TCP_ESTABLISHED &&
c$resp$state == TCP_ESTABLISHED &&
addr_matches_host(host, host_tracking) )
{
add known_hosts[host];
Log::write(Known::HOSTS_LOG, [$ts=network_time(), $host=host]);