From ae4990131a732c5ee5b0fc24809349f2373a8c19 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 21 Feb 2020 19:07:26 +0100 Subject: [PATCH] dnsdist: Add a proxy protocol header to DoH queries as well --- pdns/dnsdistdist/doh.cc | 5 +++++ 1 file changed, 5 insertions(+) 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 */ -- 2.47.3