]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Speed up response content matching
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 25 Jul 2025 14:12:39 +0000 (16:12 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 25 Jul 2025 14:17:53 +0000 (16:17 +0200)
commit67eb73850f3141c44963d95ef815fe6a0586d2a8
treedb3e4ae0c09a446844b01cb9331c4d5f4e73e9d0
parent9364aba5458c9b7bd90c82b4801a8d5699c798bb
dnsdist: Speed up response content matching

This commit introduces a new method to compare a `DNSName`
against a view of raw, wire-format bytes, skipping the
allocation and copy that is usually required to get a
second `DNSName` object to compare against.
This signifitcantly reduces the amount of time matching
a DNS response received from a backend against the content
we expect to find.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist.cc
pdns/dnsname.cc
pdns/dnsname.hh
pdns/test-dnsname_cc.cc