]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- #4103: Fix that auth-zone does not insist on SOA record first in
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 14 Jun 2018 07:09:01 +0000 (07:09 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 14 Jun 2018 07:09:01 +0000 (07:09 +0000)
  file for url downloads.

git-svn-id: file:///svn/unbound/trunk@4729 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/authzone.c

index ee84008e326bf6cc955d84d9e9048fdc21305a88..c003cf7993964e748b99a7424fa7a6f32e81eef7 100644 (file)
@@ -1,3 +1,7 @@
+14 June 2018: Wouter
+       - #4103: Fix that auth-zone does not insist on SOA record first in
+         file for url downloads.
+
 12 June 2018: Ralph
        - Don't count CNAME response types received during qname minimisation as
          query restart.
index 7ec280bafd92505002b8c236f0ad9d511ae33567..f1ca2a2b0552ed24e678eeb220266c22dab41a43 100644 (file)
@@ -4164,8 +4164,8 @@ chunkline_non_comment_RR(struct auth_chunk** chunk, size_t* chunk_pos,
        return 0;
 }
 
-/** check syntax of chunklist zonefile, parse SOA RR, return false on
- * failure and return a string in the scratch buffer (SOA RR string)
+/** check syntax of chunklist zonefile, parse first RR, return false on
+ * failure and return a string in the scratch buffer (first RR string)
  * on failure. */
 static int
 http_zonefile_syntax_check(struct auth_xfer* xfr, sldns_buffer* buf)
@@ -4193,26 +4193,11 @@ http_zonefile_syntax_check(struct auth_xfer* xfr, sldns_buffer* buf)
                pstate.origin_len?pstate.origin:NULL, pstate.origin_len,
                pstate.prev_rr_len?pstate.prev_rr:NULL, pstate.prev_rr_len);
        if(e != 0) {
-               log_err("parse failure on SOA RR[%d]: %s",
+               log_err("parse failure on first RR[%d]: %s",
                        LDNS_WIREPARSE_OFFSET(e),
                        sldns_get_errorstr_parse(LDNS_WIREPARSE_ERROR(e)));
                return 0;
        }
-       /* check that name is correct */
-       if(query_dname_compare(rr, xfr->name) != 0) {
-               char nm[255+1], zname[255+1];
-               dname_str(rr, nm);
-               dname_str(xfr->name, zname);
-               log_err("parse failure for %s, SOA RR for %s found instead",
-                       zname, nm);
-               return 0;
-       }
-       /* check that type is SOA */
-       if(sldns_wirerr_get_type(rr, rr_len, dname_len) != LDNS_RR_TYPE_SOA) {
-               log_err("parse failure: first record in downloaded zonefile "
-                       "not of type SOA");
-               return 0;
-       }
        /* check that class is correct */
        if(sldns_wirerr_get_class(rr, rr_len, dname_len) != xfr->dclass) {
                log_err("parse failure: first record in downloaded zonefile "