Merge remote-tracking branch 'origin/topic/johanna/gh-4656'

* origin/topic/johanna/gh-4656:
  Fix parsing of EDNS rcode
This commit is contained in:
Tim Wojtulewicz 2025-07-28 14:16:16 -07:00
commit 22fc57a90a
6 changed files with 32 additions and 2 deletions

View file

@ -0,0 +1,2 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
16

Binary file not shown.

View file

@ -0,0 +1,13 @@
# @TEST-DOC: Tests that the correct extended rcode is returned for EDNS packets. Regression test for #4656.
# @TEST-EXEC: zeek -b -C -r $TRACES/dns/dns_extended_rcode.pcap %INPUT > output
# @TEST-EXEC: btest-diff output
@load base/protocols/dns
redef dns_skip_all_addl=F;
event dns_EDNS_addl(c: connection, msg: dns_msg, ans: dns_edns_additional)
{
if ( c$dns?$rcode && ans?$extended_rcode )
print ans$extended_rcode;
}