mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
improve performance of catch and release script
Defer allocation of the Entity record until it will be used.
This commit is contained in:
parent
a27ab672d9
commit
cc2981ab3b
1 changed files with 1 additions and 2 deletions
|
@ -428,13 +428,12 @@ function unblock_address_catch_release(a: addr, reason: string &default=""): boo
|
||||||
|
|
||||||
function catch_release_seen(a: addr)
|
function catch_release_seen(a: addr)
|
||||||
{
|
{
|
||||||
local e = Entity($ty=ADDRESS, $ip=addr_to_subnet(a));
|
|
||||||
|
|
||||||
if ( a in blocks )
|
if ( a in blocks )
|
||||||
{
|
{
|
||||||
@if ( ! Cluster::is_enabled() || ( Cluster::is_enabled() && Cluster::local_node_type() == Cluster::MANAGER ) )
|
@if ( ! Cluster::is_enabled() || ( Cluster::is_enabled() && Cluster::local_node_type() == Cluster::MANAGER ) )
|
||||||
local bi = blocks[a];
|
local bi = blocks[a];
|
||||||
local log: CatchReleaseInfo;
|
local log: CatchReleaseInfo;
|
||||||
|
local e = Entity($ty=ADDRESS, $ip=addr_to_subnet(a));
|
||||||
|
|
||||||
if ( [e,DROP] in rule_entities )
|
if ( [e,DROP] in rule_entities )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue