chiark / gitweb /
resolved: properly process DNAME RRs
[elogind.git] / src / resolve / resolved-dns-rr.c
index b6a2c04..d282244 100644 (file)
@@ -237,6 +237,7 @@ DnsResourceRecord* dns_resource_record_unref(DnsResourceRecord *rr) {
                 case DNS_TYPE_PTR:
                 case DNS_TYPE_NS:
                 case DNS_TYPE_CNAME:
+                case DNS_TYPE_DNAME:
                         free(rr->ptr.name);
                         break;
                 case DNS_TYPE_HINFO:
@@ -319,6 +320,7 @@ int dns_resource_record_equal(const DnsResourceRecord *a, const DnsResourceRecor
         case DNS_TYPE_PTR:
         case DNS_TYPE_NS:
         case DNS_TYPE_CNAME:
+        case DNS_TYPE_DNAME:
                 return dns_name_equal(a->ptr.name, b->ptr.name);
 
         case DNS_TYPE_HINFO:
@@ -424,6 +426,7 @@ int dns_resource_record_to_string(const DnsResourceRecord *rr, char **ret) {
         case DNS_TYPE_PTR:
         case DNS_TYPE_NS:
         case DNS_TYPE_CNAME:
+        case DNS_TYPE_DNAME:
                 s = strjoin(k, " ", rr->ptr.name, NULL);
                 if (!s)
                         return -ENOMEM;
@@ -591,7 +594,6 @@ static const struct {
         { DNS_TYPE_AXFR,  "AXFR"  },
 };
 
-
 const char *dns_type_to_string(uint16_t type) {
         unsigned i;