]> granicus.if.org Git - pdns/commitdiff
write bestwho in non-ECS case as well
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 15 Mar 2018 14:06:07 +0000 (15:06 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 15 Mar 2018 14:06:07 +0000 (15:06 +0100)
pdns/lua-record.cc

index fac8ac201635e0f3882160d7785b37248e87140c..28845a9ecf7b5574786b5a8ac750abc6cb84465d 100644 (file)
@@ -426,12 +426,13 @@ std::vector<shared_ptr<DNSRecordContent>> luaSynth(const std::string& code, cons
   if(dnsp.hasEDNSSubnet()) {
     lua.writeVariable("ecswho", dnsp.getRealRemote());
     bestwho=dnsp.getRealRemote().getNetwork();
-    lua.writeVariable("bestwho", dnsp.getRealRemote().getNetwork());
   }
   else {
     bestwho=dnsp.getRemote();
   }
 
+  lua.writeVariable("bestwho", bestwho);
+
   lua.writeFunction("latlon", [&bestwho]() {
       double lat, lon;
       getLatLon(bestwho.toString(), lat, lon);