resolved: rr - fix parsing of NSEC3
authorTom Gundersen <teg@jklm.no>
Thu, 23 Jul 2015 11:28:09 +0000 (13:28 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 23 Jul 2015 16:06:50 +0000 (18:06 +0200)
We were appending rather than reading the bitmap.

src/resolve/resolved-dns-packet.c

index 25035ed..b76f981 100644 (file)
@@ -1712,10 +1712,12 @@ int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, size_t *start) {
                 if (r < 0)
                         goto fail;
 
-                r = dns_packet_append_types(p, rr->nsec3.types, NULL);
+                r = dns_packet_read_type_windows(p, &rr->nsec.types, offset + rdlength - p->rindex, NULL);
                 if (r < 0)
                         goto fail;
 
+                /* empty non-terminals can have NSEC3 records, so empty bitmaps are allowed */
+
                 break;
         }
         default: