]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Only call getsockname() once per incoming DoH connection 11851/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 11 Aug 2022 15:58:29 +0000 (17:58 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 11 Aug 2022 15:58:29 +0000 (17:58 +0200)
commit031ba2a278534dd05cdf1683ef88b9fc828cce56
tree55a9aefc62bba123eca96074c9bb230770fb20bd
parente4eb59a78d965e92ca883564b56fdd8ae7550bed
dnsdist: Only call getsockname() once per incoming DoH connection

The current code is calling h2o_socket_getpeername() and
h2o_socket_getsockname() once per DoH _query_, and while the former
is cheap because h2o caches the result for us, the latter is actually
expensive, so this code caches both values so that we only retrieve
them once per DoH connection.
pdns/dnsdistdist/doh.cc