mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
Add column to packet_filter.log for failure reason
This commit is contained in:
parent
82adecb2ad
commit
5e4db6d0c4
8 changed files with 50 additions and 33 deletions
|
@ -48,6 +48,9 @@ export {
|
|||
|
||||
## Indicate if the filter was applied successfully.
|
||||
success: bool &log &default=T;
|
||||
|
||||
## A string reason why the filter failed to be created/installed.
|
||||
failure_reason: string &log &optional;
|
||||
};
|
||||
|
||||
## The BPF filter that is used by default to define what traffic should
|
||||
|
@ -317,6 +320,8 @@ function install(): bool
|
|||
{
|
||||
# Installing the filter failed for some reason.
|
||||
info$success = F;
|
||||
info$failure_reason = Pcap::get_filter_state_string(DefaultPcapFilter);
|
||||
|
||||
NOTICE([$note=Install_Failure,
|
||||
$msg=fmt("Installing packet filter failed"),
|
||||
$sub=current_filter]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue