From: Pieter Lexis Date: Tue, 17 Apr 2018 16:27:40 +0000 (+0200) Subject: rec: initialize variableAnswer with dc->d_variable X-Git-Tag: dnsdist-1.3.1~50^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb9444beb4e5275646afead8a78e2a85437e8aab;p=pdns rec: initialize variableAnswer with dc->d_variable --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index d808e55e0..8bdc0c139 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -871,7 +871,7 @@ static void startDoResolve(void *p) uint16_t maxanswersize = dc->d_tcp ? 65535 : min(static_cast(512), g_udpTruncationThreshold); EDNSOpts edo; std::vector > ednsOpts; - bool variableAnswer = false; + bool variableAnswer = dc->d_variable; bool haveEDNS=false; DNSPacketWriter::optvect_t returnedEdnsOptions; // Here we stuff all the options for the return packet uint8_t ednsExtRCode = 0; @@ -969,7 +969,6 @@ static void startDoResolve(void *p) sr.setQuerySource(dc->d_remote, g_useIncomingECS && !dc->d_ednssubnet.source.empty() ? boost::optional(dc->d_ednssubnet) : boost::none); bool tracedQuery=false; // we could consider letting Lua know about this too - variableAnswer = dc->d_variable || variableAnswer; bool shouldNotValidate = false; /* preresolve expects res (dq.rcode) to be set to RCode::NoError by default */