while(di.backend->get(rr)) {
if(rr.qtype.getCode() != 0) {
- if ( (rr.qtype.getCode() == QType::NS || rr.qtype.getCode() == QType::SRV || rr.qtype.getCode() == QType::MX || rr.qtype.getCode() == QType::CNAME) && !rr.content.empty() && rr.content[rr.content.size()-1] != '.')
- rr.content.append(1, '.');
+ switch (rr.qtype.getCode()) {
+ case QType::ALIAS:
+ case QType::CNAME:
+ case QType::MX:
+ case QType::NS:
+ case QType::SRV:
+ if (!rr.content.empty() && rr.content[rr.content.size()-1] != '.') {
+ rr.content.append(1, '.');
+ }
+ break;
+ }
cout<<rr.qname<<"\t"<<rr.ttl<<"\tIN\t"<<rr.qtype.toString()<<"\t"<<rr.content<<"\n";
}
external-mail.example.com 120 IN MX 25 server1.test.com.
france.example.com 120 IN NS ns1.otherprovider.net.
france.example.com 120 IN NS ns2.otherprovider.net.
-google-alias.example.com 120 IN ALIAS google-public-dns-a.google.com
+google-alias.example.com 120 IN ALIAS google-public-dns-a.google.com.
hightype.example.com 120 IN A 192.168.1.5
hightype.example.com 120 IN TYPE65534 \# 5 07ed260001
host-0.example.com 120 IN A 192.168.1.0
external-mail.example.com 120 IN MX 25 server1.test.com.
france.example.com 120 IN NS ns1.otherprovider.net.
france.example.com 120 IN NS ns2.otherprovider.net.
-google-alias.example.com 120 IN ALIAS google-public-dns-a.google.com
+google-alias.example.com 120 IN ALIAS google-public-dns-a.google.com.
hightype.example.com 120 IN A 192.168.1.5
hightype.example.com 120 IN TYPE65534 \# 5 07ed260001
host-0.example.com 120 IN A 192.168.1.0