Add basic event for emitting DNS dynamic update data

This also changes the existing DU btest from checking to ensure a weird was
emitted to checking the output from the event.
This commit is contained in:
Tim Wojtulewicz 2025-09-09 15:14:10 -07:00
parent fa6eb6c928
commit d344f015e0
7 changed files with 42 additions and 21 deletions

View file

@ -1,6 +1,12 @@
# @TEST-DOC: Tests that a DNS dynamic update packet doesn't error but reports an unknown opcode weird
# @TEST-EXEC: zeek -b -C -r $TRACES/dns/dynamic-update.pcap %INPUT
# @TEST-EXEC: btest-diff weird.log
# @TEST-DOC: Tests that a DNS dynamic update packet is processed.
# @TEST-EXEC: zeek -b -C -r $TRACES/dns/dynamic-update.pcap %INPUT >out 2>&1
# @TEST-EXEC: btest-diff out
# @TEST-EXEC: ! test -f weird.log
@load base/frameworks/notice/weird
@load base/protocols/dns
event dns_dynamic_update(c: connection, msg: dns_msg, zname: string, zclass: count)
{
print msg, zname, zclass, DNS::classes[zclass];
}