mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

By default, dns_skip_all_addl is set to false. This causes several events to not be raised. This change emits warnings when a user defines event handlers for events that will not be raised. Furthermore, it adds notes about this behavior to the documentation. We also introduce a new BIF, `is_event_handled`, which checks if an event is handled. Fixes GH-4061
31 lines
651 B
Text
31 lines
651 B
Text
# Check that warnings are for events that will not be raised
|
|
|
|
# @TEST-EXEC: zeek -b %INPUT
|
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
|
|
|
|
@load base/protocols/dns
|
|
|
|
event dns_EDNS_addl(c: connection, msg: dns_msg, ans: dns_edns_additional)
|
|
{
|
|
print "";
|
|
}
|
|
|
|
event dns_EDNS_ecs(c: connection, msg: dns_msg, opt: dns_edns_ecs)
|
|
{
|
|
print "";
|
|
}
|
|
|
|
event dns_EDNS_tcp_keepalive(c: connection, msg: dns_msg, opt: dns_edns_tcp_keepalive)
|
|
{
|
|
print "";
|
|
}
|
|
|
|
event dns_EDNS_cookie(c: connection, msg: dns_msg, opt: dns_edns_cookie)
|
|
{
|
|
print "";
|
|
}
|
|
|
|
event dns_TKEY(c: connection, msg: dns_msg, ans: dns_tkey)
|
|
{
|
|
print "";
|
|
}
|