mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Fix behavior of connection_pending event
It is now really only raised when Bro is terminating. Also adds a test-case that raises the event.
This commit is contained in:
parent
743e563dd9
commit
93db6cd876
3 changed files with 9 additions and 1 deletions
|
@ -355,7 +355,7 @@ void TCP_Analyzer::Done()
|
|||
{
|
||||
Analyzer::Done();
|
||||
|
||||
if ( connection_pending && is_active && ! BothClosed() )
|
||||
if ( connection_pending && is_active && ! BothClosed() && terminating )
|
||||
Event(connection_pending);
|
||||
|
||||
LOOP_OVER_GIVEN_CHILDREN(i, packet_children)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1469573308.013636, Connection pending, [orig_h=192.168.4.149, orig_p=55881/tcp, resp_h=74.125.239.152, resp_p=443/tcp], ShADad
|
7
testing/btest/scripts/base/protocols/tcp/pending.bro
Normal file
7
testing/btest/scripts/base/protocols/tcp/pending.bro
Normal file
|
@ -0,0 +1,7 @@
|
|||
# @TEST-EXEC: bro -C -r $TRACES/tls/chrome-34-google.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
|
||||
event connection_pending(c: connection)
|
||||
{
|
||||
print current_time(), "Connection pending", c$id, c$history;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue