Commit 8b8c7971 authored by Grigorii Demidov's avatar Grigorii Demidov
Browse files

dnssec/nsec3: missed kr_error() fixed

parent 79179e8a
...@@ -681,10 +681,10 @@ int kr_nsec3_no_data_ds(const knot_pkt_t *pkt, knot_section_t section_id, ...@@ -681,10 +681,10 @@ int kr_nsec3_no_data_ds(const knot_pkt_t *pkt, knot_section_t section_id,
assert(encloser_name && covering_next_nsec3); assert(encloser_name && covering_next_nsec3);
if (!has_optout(covering_next_nsec3)) { if (!has_optout(covering_next_nsec3)) {
ret = DNSSEC_NOT_FOUND; /* Don't satisfies RFC5155 8.6, second paragraph. */
ret = kr_error(DNSSEC_NOT_FOUND);
} }
/* Satisfies RFC5155 8.6, second paragraph. */
return ret; return ret;
} }
...@@ -727,7 +727,7 @@ int kr_nsec3_no_data_no_ds(const knot_pkt_t *pkt, knot_section_t section_id, ...@@ -727,7 +727,7 @@ int kr_nsec3_no_data_no_ds(const knot_pkt_t *pkt, knot_section_t section_id,
* denial of existance can not be proven. * denial of existance can not be proven.
* Set error code to proceed unsecure. * Set error code to proceed unsecure.
*/ */
ret = DNSSEC_NOT_FOUND; ret = kr_error(DNSSEC_NOT_FOUND);
} }
return ret; return ret;
......
...@@ -425,7 +425,7 @@ static int validate(knot_layer_t *ctx, knot_pkt_t *pkt) ...@@ -425,7 +425,7 @@ static int validate(knot_layer_t *ctx, knot_pkt_t *pkt)
ret = kr_nsec3_no_data_no_ds(pkt, KNOT_AUTHORITY, knot_pkt_qname(pkt), knot_pkt_qtype(pkt)); ret = kr_nsec3_no_data_no_ds(pkt, KNOT_AUTHORITY, knot_pkt_qname(pkt), knot_pkt_qtype(pkt));
} }
if (ret != 0) { if (ret != 0) {
if (has_nsec3 && (ret == DNSSEC_NOT_FOUND)) { if (has_nsec3 && (ret == kr_error(DNSSEC_NOT_FOUND))) {
DEBUG_MSG(qry, "<= can't prove NODATA due to optout, going insecure\n"); DEBUG_MSG(qry, "<= can't prove NODATA due to optout, going insecure\n");
qry->flags &= ~QUERY_DNSSEC_WANT; qry->flags &= ~QUERY_DNSSEC_WANT;
qry->flags |= QUERY_DNSSEC_INSECURE; qry->flags |= QUERY_DNSSEC_INSECURE;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment