mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Merge remote-tracking branch 'origin/topic/johanna/rule-reasons'
BIT-1655 #merged * origin/topic/johanna/rule-reasons: NetControl: allow reasons in remove_rule calls.
This commit is contained in:
commit
84b372a772
22 changed files with 130 additions and 116 deletions
|
@ -50,7 +50,7 @@ event connection_established(c: connection)
|
|||
event NetControl::rule_added(r: NetControl::Rule, p: NetControl::PluginState, msg: string)
|
||||
{
|
||||
print "rule added", r$entity, r$ty;
|
||||
NetControl::remove_rule(r$id);
|
||||
NetControl::remove_rule(r$id, "removing");
|
||||
}
|
||||
|
||||
event NetControl::rule_exists(r: NetControl::Rule, p: NetControl::PluginState, msg: string)
|
||||
|
@ -103,9 +103,9 @@ event NetControl::broker_add_rule(id: count, r: NetControl::Rule)
|
|||
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::broker_rule_timeout, id, r, NetControl::FlowInfo()));
|
||||
}
|
||||
|
||||
event NetControl::broker_remove_rule(id: count, r: NetControl::Rule)
|
||||
event NetControl::broker_remove_rule(id: count, r: NetControl::Rule, reason: string)
|
||||
{
|
||||
print "remove_rule", id, r$entity, r$ty;
|
||||
print "remove_rule", id, r$entity, r$ty, reason;
|
||||
|
||||
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::broker_rule_removed, id, r, ""));
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ event connection_established(c: connection)
|
|||
NetControl::drop_address_catch_release(id$orig_h);
|
||||
if ( info$current_block_id != "" )
|
||||
{
|
||||
NetControl::unblock_address_catch_release(id$orig_h);
|
||||
NetControl::unblock_address_catch_release(id$orig_h, "reason here");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ event NetControl::rule_added(r: NetControl::Rule, p: NetControl::PluginState, ms
|
|||
return;
|
||||
|
||||
# delete directly, without notifying anything.
|
||||
NetControl::delete_rule(r$id);
|
||||
NetControl::delete_rule(r$id, "testing");
|
||||
NetControl::catch_release_seen(subnet_to_addr(r$entity$ip));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue