From: Remi Gacogne Date: Fri, 21 Feb 2020 18:07:26 +0000 (+0100) Subject: dnsdist: Add a proxy protocol header to DoH queries as well X-Git-Tag: dnsdist-1.5.0-alpha1~12^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae4990131a732c5ee5b0fc24809349f2373a8c19;p=thirdparty%2Fpdns.git dnsdist: Add a proxy protocol header to DoH queries as well --- diff --git a/pdns/dnsdistdist/doh.cc b/pdns/dnsdistdist/doh.cc index fcddb9d929..96a77e88c5 100644 --- a/pdns/dnsdistdist/doh.cc +++ b/pdns/dnsdistdist/doh.cc @@ -24,6 +24,7 @@ #include "dns.hh" #include "dolog.hh" #include "dnsdist-ecs.hh" +#include "dnsdist-proxy-protocol.hh" #include "dnsdist-rules.hh" #include "dnsdist-xpf.hh" #include "libssl.hh" @@ -502,6 +503,10 @@ static int processDOHQuery(DOHUnit* du) dh->id = idOffset; + if (dq.addProxyProtocol && ss->useProxyProtocol) { + addProxyProtocol(dq); + } + int fd = pickBackendSocketForSending(ss); try { /* you can't touch du after this line, because it might already have been freed */