]> 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, 22 Aug 2025 13:12:32 +0000 (15:12 +0200)
commit0f5831d0348ef3599a09c7894a4005c01e7bc05f
tree2c2977a6b7a6122bb72823f7a60a1b884eb54bf9
parent8b2dda6cbfbfe131f03ddc14a7795172bae26648
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>
(cherry picked from commit 67eb73850f3141c44963d95ef815fe6a0586d2a8)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist.cc
pdns/dnsname.cc
pdns/dnsname.hh
pdns/test-dnsname_cc.cc