]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix up mydns backend to properly return SOA records in ANY queries.
authorbert hubert <bert.hubert@powerdns.com>
Wed, 7 Sep 2016 16:23:34 +0000 (18:23 +0200)
committerbert hubert <bert.hubert@powerdns.com>
Tue, 13 Sep 2016 10:53:30 +0000 (12:53 +0200)
modules/mydnsbackend/mydnsbackend.cc

index a9ef7ea7530564b1151bfd207ccd7dd016ff496e..8df0abeb281798c7a8f556172b0b8fb1d06858e1 100644 (file)
@@ -129,7 +129,7 @@ MyDNSBackend::MyDNSBackend(const string &suffix) {
 
     d_listQuery_stmt = d_db->prepare(listQuery, 1);
   
-    anyQuery += ") UNION (SELECT 'SOA' AS type, origin AS data, '0' AS aux, ttl, id AS zone FROM `"+soatable+"` WHERE id = ? AND origin = ?";
+    anyQuery += ") UNION (SELECT 'SOA' AS type, CONCAT_WS(' ', ns, mbox,serial,refresh,retry,expire,minimum) AS data, '0' AS aux, ttl, id AS zone FROM `"+soatable+"` WHERE id = ? AND origin = ?";
 
     if (!soawhere.empty()) {
       anyQuery += " AND "+soawhere;