From: Ruben d'Arco Date: Mon, 13 May 2013 08:00:15 +0000 (+0200) Subject: Delete NSEC3PARAM without extra query. X-Git-Tag: rec-3.6.0-rc1~556^2~3^2~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e068ee157a9131a97db6385508758576798e915f;p=thirdparty%2Fpdns.git Delete NSEC3PARAM without extra query. [ci skip] --- diff --git a/modules/gmysqlbackend/gmysqlbackend.cc b/modules/gmysqlbackend/gmysqlbackend.cc index 6473cef62b..ce270b712d 100644 --- a/modules/gmysqlbackend/gmysqlbackend.cc +++ b/modules/gmysqlbackend/gmysqlbackend.cc @@ -102,7 +102,6 @@ public: declare(suffix,"set-order-and-auth-query", "DNSSEC set ordering query", "update records set ordername='%s',auth=%d where name='%s' and domain_id='%d'"); declare(suffix,"nullify-ordername-and-update-auth-query", "DNSSEC nullify ordername and update auth query", "update records set ordername=NULL,auth=%d where domain_id='%d' and name='%s'"); declare(suffix,"nullify-ordername-and-auth-query", "DNSSEC nullify ordername and auth query", "update records set ordername=NULL,auth=0 where name='%s' and type='%s' and domain_id='%d'"); - declare(suffix,"nullify-ordername-and-auth-ent-query", "DNSSEC nullify ordername and auth for ENT records with name.", "update records set ordername=NULL, auth=NULL where name='%s' AND type IS NULL and domain_id='%d'"); declare(suffix,"set-auth-on-ds-record-query", "DNSSEC set auth on a DS record", "update records set auth=1 where domain_id='%d' and name='%s' and type='DS'"); declare(suffix,"update-serial-query","", "update domains set notified_serial=%d where id=%d"); diff --git a/modules/gpgsqlbackend/gpgsqlbackend.cc b/modules/gpgsqlbackend/gpgsqlbackend.cc index 0e45a421b0..49f432122f 100644 --- a/modules/gpgsqlbackend/gpgsqlbackend.cc +++ b/modules/gpgsqlbackend/gpgsqlbackend.cc @@ -104,7 +104,6 @@ public: declare(suffix,"nullify-ordername-and-update-auth-query", "DNSSEC nullify ordername and update auth query", "update records set ordername=NULL,auth=(%d = 1) where domain_id='%d' and name='%s'"); declare(suffix,"nullify-ordername-and-auth-query", "DNSSEC nullify ordername and auth query", "update records set ordername=NULL,auth=false where name=E'%s' and type=E'%s' and domain_id='%d'"); - declare(suffix,"nullify-ordername-and-auth-ent-query", "DNSSEC nullify ordername and auth for ENT records with name.", "update records set ordername=NULL, auth=NULL where name=E'%s' AND type IS NULL and domain_id='%d'"); declare(suffix,"update-serial-query","", "update domains set notified_serial=%d where id=%d"); declare(suffix,"update-lastcheck-query","", "update domains set last_check=%d where id=%d"); diff --git a/modules/gsqlite3backend/gsqlite3backend.cc b/modules/gsqlite3backend/gsqlite3backend.cc index 8585a7e118..02dc4fee10 100644 --- a/modules/gsqlite3backend/gsqlite3backend.cc +++ b/modules/gsqlite3backend/gsqlite3backend.cc @@ -97,7 +97,6 @@ public: declare(suffix,"nullify-ordername-and-update-auth-query", "DNSSEC nullify ordername and update auth query", "update records set ordername=NULL,auth=%d where domain_id='%d' and name='%s'"); declare(suffix,"nullify-ordername-and-auth-query", "DNSSEC nullify ordername and auth query", "update records set ordername=NULL,auth=0 where name='%s' and type='%s' and domain_id='%d'"); - declare(suffix,"nullify-ordername-and-auth-ent-query", "DNSSEC nullify ordername and auth for ENT records with name.", "update records set ordername=NULL, auth=NULL where name='%s' AND type IS NULL and domain_id='%d'"); declare(suffix,"set-auth-on-ds-record-query", "DNSSEC set auth on a DS record", "update records set auth=1 where domain_id='%d' and name='%s' and type='DS'"); declare( suffix, "master-zone-query", "Data", "select master from domains where name='%s' and type='SLAVE'"); diff --git a/pdns/backends/gsql/gsqlbackend.cc b/pdns/backends/gsql/gsqlbackend.cc index eb97579c2c..63217e463e 100644 --- a/pdns/backends/gsql/gsqlbackend.cc +++ b/pdns/backends/gsql/gsqlbackend.cc @@ -300,7 +300,6 @@ GSQLBackend::GSQLBackend(const string &mode, const string &suffix) d_setOrderAuthQuery = getArg("set-order-and-auth-query"); d_nullifyOrderNameAndUpdateAuthQuery = getArg("nullify-ordername-and-update-auth-query"); d_nullifyOrderNameAndAuthQuery = getArg("nullify-ordername-and-auth-query"); - d_nullifyOrderNameAndAuthENTQuery = getArg("nullify-ordername-and-auth-ent-query"); d_setAuthOnDsRecordQuery = getArg("set-auth-on-ds-record-query"); d_AddDomainKeyQuery = getArg("add-domain-key-query"); @@ -362,10 +361,7 @@ bool GSQLBackend::nullifyDNSSECOrderNameAndAuth(uint32_t domain_id, const std::s if(!d_dnssecQueries) return false; char output[1024]; - if (type == "TYPE0") - snprintf(output, sizeof(output)-1, d_nullifyOrderNameAndAuthENTQuery.c_str(), sqlEscape(qname).c_str(), domain_id); - else - snprintf(output, sizeof(output)-1, d_nullifyOrderNameAndAuthQuery.c_str(), sqlEscape(qname).c_str(), sqlEscape(type).c_str(), domain_id); + snprintf(output, sizeof(output)-1, d_nullifyOrderNameAndAuthQuery.c_str(), sqlEscape(qname).c_str(), sqlEscape(type).c_str(), domain_id); try { d_db->doCommand(output); } diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index 8a43f4bed9..160b93cfc5 100755 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -124,8 +124,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * di->backend->list(di->zone, di->id); vector rrs; while (di->backend->get(rec)) { - if (rec.qtype.getCode()) - rrs.push_back(rec); + rrs.push_back(rec); } for (vector::const_iterator i = rrs.begin(); i != rrs.end(); i++) { string hashed; @@ -334,7 +333,6 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * rrs.push_back(rec); for (vector::const_iterator i = rrs.begin(); i != rrs.end(); i++) { if (!i->qtype.getCode()) {// for ENT records, we want to reset things as they have ordername=NULL and auth=NULL - di->backend->nullifyDNSSECOrderNameAndAuth(di->id, i->qname, i->qtype.getName()); di->backend->nullifyDNSSECOrderNameAndUpdateAuth(di->id, i->qname, i->auth); } else // all other records are simply updated. di->backend->updateDNSSECOrderAndAuth(di->id, di->zone, i->qname, i->auth);