]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
strip trailing dot in PTR content
authorKees Monshouwer <mind04@monshouwer.org>
Sat, 30 Jul 2016 23:43:55 +0000 (01:43 +0200)
committermind04 <mind04@monshouwer.org>
Sat, 30 Jul 2016 23:43:55 +0000 (01:43 +0200)
pdns/dnsrecords.cc

index 60eab9cef8be0f6ef9bd0ba92259ae7db4e6081c..0d7e82dadcaaa2d29223843a752e58971dcbca29 100644 (file)
@@ -38,6 +38,7 @@ void DNSResourceRecord::setContent(const string &cont) {
     case QType::CNAME:
     case QType::DNAME:
     case QType::NS:
+    case QType::PTR:
       if(!content.empty())
         boost::erase_tail(content, 1);
   }
@@ -51,6 +52,7 @@ string DNSResourceRecord::getZoneRepresentation(bool noDot) const {
     case QType::CNAME:
     case QType::DNAME:
     case QType::NS:
+    case QType::PTR:
       if (*(content.rbegin()) != '.') {
         ret<<content;
         if(!noDot)