zeek/scripts/base/frameworks/notice/actions/drop.bro
Seth Hall 9f8ba408ba Updates for the notices framework.
- Moved the Notice::notice event and Notice::policy table to both be hooks.

 - Renamed the old Notice::policy to Notice::policy_table and documented it as deprecated.
2013-02-11 14:36:14 -05:00

29 lines
689 B
Text

##! This script extends the built in notice code to implement the IP address
##! dropping functionality.
@load ../main
module Notice;
export {
redef enum Action += {
## Drops the address via Drop::drop_address, and generates an alarm.
ACTION_DROP
};
redef record Info += {
## Indicate if the $src IP address was dropped and denied network access.
dropped: bool &log &default=F;
};
}
hook notice(n: Notice::Info)
{
if ( ACTION_DROP in n$actions )
{
#local drop = React::drop_address(n$src, "");
#local addl = drop?$sub ? fmt(" %s", drop$sub) : "";
#n$dropped = drop$note != Drop::AddressDropIgnored;
#n$msg += fmt(" [%s%s]", drop$note, addl);
}
}