From: Willem Toorop Date: Sat, 27 Aug 2011 06:57:30 +0000 (+0000) Subject: Rollback last modifications. It already breaks one unit test. X-Git-Tag: release-1.6.11rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=513eedad0a3ed4051ed96b644de0c897bc3d5d51;p=thirdparty%2Fldns.git Rollback last modifications. It already breaks one unit test. ldns as a DNS tooling library should be able to handle uncomplient resource records. --- diff --git a/error.c b/error.c index 27277b8f..ff240dcc 100644 --- a/error.c +++ b/error.c @@ -88,7 +88,6 @@ ldns_lookup_table ldns_error_str[] = { { LDNS_STATUS_DNSSEC_NSEC_RR_NOT_COVERED, "RR not covered by the given NSEC RRs" }, { LDNS_STATUS_DNSSEC_NSEC_WILDCARD_NOT_COVERED, "wildcard not covered by the given NSEC RRs" }, { LDNS_STATUS_DNSSEC_NSEC3_ORIGINAL_NOT_FOUND, "original of NSEC3 hashed name could not be found" }, - { LDNS_STATUS_WIRE_MISSING_RDATA_FIELDS, "More rdata fields were expected while parsing the wireformat data" }, { 0, NULL } }; diff --git a/ldns/error.h b/ldns/error.h index 4b2b62d7..e17846f3 100644 --- a/ldns/error.h +++ b/ldns/error.h @@ -98,8 +98,7 @@ enum ldns_enum_status { LDNS_STATUS_DNSSEC_EXISTENCE_DENIED, LDNS_STATUS_DNSSEC_NSEC_RR_NOT_COVERED, LDNS_STATUS_DNSSEC_NSEC_WILDCARD_NOT_COVERED, - LDNS_STATUS_DNSSEC_NSEC3_ORIGINAL_NOT_FOUND, - LDNS_STATUS_WIRE_MISSING_RDATA_FIELDS + LDNS_STATUS_DNSSEC_NSEC3_ORIGINAL_NOT_FOUND }; typedef enum ldns_enum_status ldns_status; diff --git a/wire2host.c b/wire2host.c index 5eb2acbd..e87fcdf5 100644 --- a/wire2host.c +++ b/wire2host.c @@ -271,9 +271,6 @@ ldns_wire2rdf(ldns_rr *rr, const uint8_t *wire, size_t max, size_t *pos) cur_rdf = NULL; } } - if (rdf_index < ldns_rr_descriptor_minimum(descriptor)) { - return LDNS_STATUS_WIRE_MISSING_RDATA_FIELDS; - } return LDNS_STATUS_OK; } @@ -319,10 +316,10 @@ ldns_wire2rr(ldns_rr **rr_p, const uint8_t *wire, size_t max, status = ldns_wire2rdf(rr, wire, max, pos); LDNS_STATUS_CHECK_GOTO(status, status_error); - ldns_rr_set_question(rr, false); + ldns_rr_set_question(rr, false); } else { - ldns_rr_set_question(rr, true); - } + ldns_rr_set_question(rr, true); + } *rr_p = rr; return LDNS_STATUS_OK;