Permalink
Browse files

traling dot in DNAME content

  • Loading branch information...
1 parent 2a077df commit f7453121cc871017732627b3383ab6acc42ee791 @mind04 mind04 committed with mind04 Dec 11, 2015
Showing with 5 additions and 3 deletions.
  1. +1 −0 modules/bindbackend/bindbackend2.cc
  2. +2 −1 pdns/dnsrecords.cc
  3. +1 −1 pdns/pdnssec.cc
  4. +1 −1 pdns/resolver.cc
@@ -276,6 +276,7 @@ bool Bind2Backend::feedRecord(const DNSResourceRecord &r, string *ordername)
*d_of<<qname<<"\t"<<r.ttl<<"\t"<<r.qtype.getName()<<"\t"<<r.priority<<"\t"<<content<<endl;
break;
case QType::CNAME:
+ case QType::DNAME:
case QType::NS:
if(!stripDomainSuffix(&content, domain))
content=stripDot(content)+".";
View
@@ -26,7 +26,7 @@
void DNSResourceRecord::setContent(const string &cont) {
content = cont;
- if(!content.empty() && (qtype==QType::MX || qtype==QType::NS || qtype==QType::CNAME))
+ if(!content.empty() && (qtype==QType::MX || qtype==QType::NS || qtype==QType::CNAME || qtype==QType::DNAME))
boost::erase_tail(content, 1);
if(qtype.getCode() == QType::MX) {
@@ -58,6 +58,7 @@ string DNSResourceRecord::getZoneRepresentation() const {
if (*(content.rbegin()) != '.') ret<<".";
break;
case QType::CNAME:
+ case QType::DNAME:
case QType::NS:
ret<<content;
if (*(content.rbegin()) != '.') ret<<".";
View
@@ -607,7 +607,7 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& 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<<" with type "<<rr.qtype.getName()<<" has a trailing dot in the content ("<<rr.content<<"). Your backend might not work well with this."<<endl;
numwarnings++;
View
@@ -203,7 +203,7 @@ static int parseResult(MOADNSParser& mdp, const std::string& origQname, uint16_t
uint16_t qtype=rr.qtype.getCode();
- if(!rr.content.empty() && (qtype==QType::MX || qtype==QType::NS || qtype==QType::CNAME))
+ if(!rr.content.empty() && (qtype==QType::MX || qtype==QType::NS || qtype==QType::CNAME || qtype==QType::DNAME))
boost::erase_tail(rr.content, 1);
if(rr.qtype.getCode() == QType::MX) {

0 comments on commit f745312

Please sign in to comment.