NetControl: allow reasons in remove_rule calls.

This adds the capability for the user to attach a reason when removing
or destroying a rule. The message will both be logged in netcontrol.log
and forwarded to the responsible plugins.

Addresses BIT-1655
This commit is contained in:
Johanna Amann 2016-08-05 10:47:58 -07:00
parent 9d9c7bafd3
commit 4f1a2c7b62
21 changed files with 129 additions and 115 deletions

View file

@ -12,14 +12,14 @@ function add_rule(r: Rule) : string
return add_rule_impl(r);
}
function delete_rule(id: string) : bool
function delete_rule(id: string, reason: string &default="") : bool
{
return delete_rule_impl(id);
return delete_rule_impl(id, reason);
}
function remove_rule(id: string) : bool
function remove_rule(id: string, reason: string &default="") : bool
{
return remove_rule_impl(id);
return remove_rule_impl(id, reason);
}
event rule_expire(r: Rule, p: PluginState) &priority=-5