]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
traling dot in DNAME content 3022/head
authorKees Monshouwer <mind04@monshouwer.org>
Fri, 11 Dec 2015 08:39:43 +0000 (09:39 +0100)
committermind04 <mind04@monshouwer.org>
Fri, 11 Dec 2015 08:55:06 +0000 (09:55 +0100)
modules/bindbackend/bindbackend2.cc
pdns/dnsrecords.cc
pdns/pdnsutil.cc
pdns/resolver.cc

index a8b71d32e0ef374a1ca0d388bd0837b7f299c19c..c6faaf7938005840b51fa2920fa948d137beac53 100644 (file)
@@ -270,6 +270,7 @@ bool Bind2Backend::feedRecord(const DNSResourceRecord &rr, string *ordername)
   case QType::MX:
   case QType::SRV:
   case QType::CNAME:
+  case QType::DNAME:
   case QType::NS:
     if(!stripDomainSuffix(&content, name))
       content=stripDot(content)+".";
index 8684c2d75f17ea729af5cf6298918bee51c9c429..49c1e2f9abc36c3b0c9450d433cdb3a6d95388ec 100644 (file)
@@ -36,6 +36,7 @@ void DNSResourceRecord::setContent(const string &cont) {
       if (content.size() >= 2 && *(content.rbegin()+1) == ' ')
         return;
     case QType::CNAME:
+    case QType::DNAME:
     case QType::NS:
       if(!content.empty())
         boost::erase_tail(content, 1);
@@ -48,6 +49,7 @@ string DNSResourceRecord::getZoneRepresentation(bool noDot) const {
     case QType::SRV:
     case QType::MX:
     case QType::CNAME:
+    case QType::DNAME:
     case QType::NS:
       if (*(content.rbegin()) != '.') {
         ret<<content;
index 927658412d5be0c9218f16bc1f13c9600f0ec664..0b80dbe589ac6f68991f40a6782a485d63ab49af 100644 (file)
@@ -604,7 +604,7 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone)
     //   numerrors++;
     // }
 
-    if ( (rr.qtype.getCode() == QType::NS || rr.qtype.getCode() == QType::SRV || rr.qtype.getCode() == QType::MX || rr.qtype.getCode() == QType::CNAME) &&
+    if ( (rr.qtype.getCode() == QType::NS || rr.qtype.getCode() == QType::SRV || rr.qtype.getCode() == QType::MX || rr.qtype.getCode() == QType::CNAME || rr.qtype.getCode() == QType::DNAME) &&
          rr.content[rr.content.size()-1] == '.') {
       cout<<"[Warning] The record "<<rr.qname.toString()<<" with type "<<rr.qtype.getName()<<" has a trailing dot in the content ("<<rr.content<<"). Your backend might not work well with this."<<endl;
       numwarnings++;
index aa2c502d54ce85ff124d3935bc9965e777c2c86c..5bf0c65bd5916ebe4cf9bae82f53c7a3e95510f1 100644 (file)
@@ -208,6 +208,7 @@ static int parseResult(MOADNSParser& mdp, const DNSName& origQname, uint16_t ori
         if (rr.content.size() >= 2 && *(rr.content.rbegin()+1) == ' ')
           break;
       case QType::CNAME:
+      case QType::DNAME:
       case QType::NS:
         if(!rr.content.empty())
           boost::erase_tail(rr.content, 1);