GH-163: Use ID name (including module name) to create EventExpr when possible

The change to the capture-loss test is actually a fix for a bug exposed by the
code change. Previously it wasn't firing the scheduled event because of a failed
name lookup. Now that the lookup has been fixed, the event happens twice.
This commit is contained in:
Tim Wojtulewicz 2022-08-09 13:03:57 -07:00
parent a0a2a18337
commit 687dd05ddb
3 changed files with 8 additions and 2 deletions

View file

@ -1936,10 +1936,14 @@ event:
if ( id->IsDeprecated() )
reporter->Warning("%s", id->GetDeprecationWarning().c_str());
}
$$ = new EventExpr(id->Name(), {AdoptRef{}, $3});
}
else
{
$$ = new EventExpr($1, {AdoptRef{}, $3});
}
}
;
case_list:

View file

@ -8,4 +8,5 @@
#fields ts ts_delta peer gaps acks percent_lost
#types time interval string count count double
XXXXXXXXXX.XXXXXX 0.000000 zeek 0 0 0.0
XXXXXXXXXX.XXXXXX 0.000000 zeek 0 0 0.0
#close XXXX-XX-XX-XX-XX-XX

View file

@ -8,4 +8,5 @@
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p n peer_descr actions email_dest suppress_for remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude
#types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] set[string] interval string string string double double
XXXXXXXXXX.XXXXXX - - - - - - - - - CaptureLoss::Too_Little_Traffic Only observed 0 TCP ACKs and was expecting at least 1. - - - - - - Notice::ACTION_LOG (empty) 3600.000000 - - - - -
XXXXXXXXXX.XXXXXX - - - - - - - - - CaptureLoss::Too_Little_Traffic Only observed 0 TCP ACKs and was expecting at least 1. - - - - - - Notice::ACTION_LOG (empty) 3600.000000 - - - - -
#close XXXX-XX-XX-XX-XX-XX