*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)+".";
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) {
if (*(content.rbegin()) != '.') ret<<".";
break;
case QType::CNAME:
+ case QType::DNAME:
case QType::NS:
ret<<content;
if (*(content.rbegin()) != '.') ret<<".";
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++;
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) {