mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Tweak find-filtered-trace to not flag traces if they have non-TCP
traffic. Closes #160.
This commit is contained in:
parent
ee5212c4a9
commit
1f6fc4415f
5 changed files with 10 additions and 1 deletions
|
@ -32,6 +32,7 @@ function should_detect(): bool
|
|||
|
||||
global saw_tcp_conn_with_data: bool = F;
|
||||
global saw_a_tcp_conn: bool = F;
|
||||
global saw_a_non_tcp_conn: bool = F;
|
||||
|
||||
event connection_state_remove(c: connection)
|
||||
{
|
||||
|
@ -42,7 +43,10 @@ event connection_state_remove(c: connection)
|
|||
return;
|
||||
|
||||
if ( ! is_tcp_port(c$id$orig_p) )
|
||||
{
|
||||
saw_a_non_tcp_conn = T;
|
||||
return;
|
||||
}
|
||||
|
||||
saw_a_tcp_conn = T;
|
||||
|
||||
|
@ -58,6 +62,9 @@ event zeek_done()
|
|||
if ( ! saw_a_tcp_conn )
|
||||
return;
|
||||
|
||||
if ( saw_a_non_tcp_conn )
|
||||
return;
|
||||
|
||||
if ( ! saw_tcp_conn_with_data )
|
||||
Reporter::warning("The analyzed trace file was determined to contain only TCP control packets, which may indicate it's been pre-filtered. By default, Zeek reports the missing segments for this type of trace, but the 'detect_filtered_trace' option may be toggled if that's not desired.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue