pw.startRecord(rrname, ah.d_type, ah.d_ttl, ah.d_class, place, true);
if (nameOnlyTypes.count(ah.d_type)) {
rrname = pr.getName();
- pw.xfrName(rrname, true);
+ // compression is not allowed for DNAME target per rfc6672 section 2.5
+ pw.xfrName(rrname, ah.d_type != QType::DNAME);
}
else if (noNameTypes.count(ah.d_type)) {
pr.xfrBlob(blob);
/* port */
pw.xfr16BitInt(pr.get16BitInt());
auto target = pr.getName();
- pw.xfrName(target, true);
+ /* Compression is not allowed per rfc2782:
+ "Unless and until permitted by future standards action,
+ name compression is not to be used for this field."
+ */
+ pw.xfrName(target, false);
}
else {
/* sorry, unsafe type */