]> granicus.if.org Git - pdns/commitdiff
rec: initialize variableAnswer with dc->d_variable
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 17 Apr 2018 16:27:40 +0000 (18:27 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 30 May 2018 08:00:52 +0000 (10:00 +0200)
pdns/pdns_recursor.cc

index d808e55e02979d99369eeb3a577654455c149f63..8bdc0c139947f2ffcc6afa41bf5c678921cf8d8e 100644 (file)
@@ -871,7 +871,7 @@ static void startDoResolve(void *p)
     uint16_t maxanswersize = dc->d_tcp ? 65535 : min(static_cast<uint16_t>(512), g_udpTruncationThreshold);
     EDNSOpts edo;
     std::vector<pair<uint16_t, string> > 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<const EDNSSubnetOpts&>(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 */