]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/dnssec: new nsec3 test, cleanup
authorMarek Vavrusa <marek@vavrusa.com>
Fri, 29 Jan 2016 13:06:10 +0000 (13:06 +0000)
committerMarek Vavrusa <marek@vavrusa.com>
Fri, 29 Jan 2016 13:06:10 +0000 (13:06 +0000)
lib/dnssec/nsec3.c
lib/dnssec/nsec3.h
tests/deckard

index a3cb0ab63e92a25f44a02bc1fe49268df420988a..b8d4b5a112cbce3aa4c20f41bbf5c2f39e446df6 100644 (file)
@@ -580,47 +580,6 @@ static int no_data_response_no_ds(const knot_pkt_t *pkt, knot_section_t section_
        return kr_error(ENOENT);
 }
 
-/**
- * No data response check, DS (RFC5155 7.2.4, 2nd paragraph).
- * @param pkt        Packet structure to be processed.
- * @param section_id Packet section to be processed.
- * @param sname      Name to be checked.
- * @param stype      Type to be checked.
- * @return           0 or error code.
- */
-static int no_data_response_ds(const knot_pkt_t *pkt, knot_section_t section_id,
-                               const knot_dname_t *sname, uint16_t stype)
-{
-       assert(pkt && sname);
-       if (stype != KNOT_RRTYPE_DS) {
-               return kr_error(EINVAL);
-       }
-
-       const knot_rrset_t *covering_nsec3 = NULL;
-       int ret = closest_encloser_proof(pkt, section_id, sname, NULL, NULL, &covering_nsec3);
-       if (ret != 0) {
-               return ret;
-       }
-
-       if (has_optout(covering_nsec3)) {
-               return kr_ok();
-       }
-
-       return kr_error(ENOENT);
-}
-
-int kr_nsec3_no_data_response_check(const knot_pkt_t *pkt, knot_section_t section_id,
-                                    const knot_dname_t *sname, uint16_t stype)
-{
-       /* DS record may be matched by an existing NSEC3 RR. */
-       int ret = no_data_response_no_ds(pkt, section_id, sname, stype);
-       if ((ret == 0) || (stype != KNOT_RRTYPE_DS)) {
-               return ret;
-       }
-       /* Closest provable encloser proof must be performed else. */
-       return no_data_response_ds(pkt, section_id, sname, stype);
-}
-
 /**
  * Check whether NSEC3 RR matches a wildcard at the closest encloser and has given type bit missing.
  * @param pkt        Packet structure to be processed.
@@ -668,17 +627,6 @@ static int matches_closest_encloser_wildcard(const knot_pkt_t *pkt, knot_section
        return kr_error(ENOENT);
 }
 
-int kr_nsec3_wildcard_no_data_response_check(const knot_pkt_t *pkt, knot_section_t section_id,
-                                             const knot_dname_t *sname, uint16_t stype)
-{
-       const knot_dname_t *encloser = NULL;
-       int ret = closest_encloser_proof(pkt, section_id, sname, &encloser, NULL, NULL);
-       if (ret != 0) {
-               return ret;
-       }
-       return matches_closest_encloser_wildcard(pkt, section_id, encloser, stype);
-}
-
 int kr_nsec3_wildcard_answer_response_check(const knot_pkt_t *pkt, knot_section_t section_id,
                                             const knot_dname_t *sname, int trim_to_next)
 {
index 50e27e43172ae2db5ac7a362adbf57ec2df87bb4..4b154312d9c57ed256b5775cbda6335cbbcb95dd 100644 (file)
 int kr_nsec3_name_error_response_check(const knot_pkt_t *pkt, knot_section_t section_id,
                                        const knot_dname_t *sname);
 
-/**
- * No data response check (RFC5155 7.2.3 and 7.2.4).
- * @param pkt        Packet structure to be processed.
- * @param section_id Packet section to be processed.
- * @param sname      Name to be checked.
- * @param stype      Type to be checked.
- * @return           0 or error code.
- */
-int kr_nsec3_no_data_response_check(const knot_pkt_t *pkt, knot_section_t section_id,
-                                    const knot_dname_t *sname, uint16_t stype);
-
-/**
- * Wildcard no data response check (RFC5155 7.2.5).
- * @param pkt        Packet structure to be processed.
- * @param section_id Packet section to be processed.
- * @param sname      Name to be checked.
- * @param stype      Type to be checked.
- * @return           0 or error code.
- */
-int kr_nsec3_wildcard_no_data_response_check(const knot_pkt_t *pkt, knot_section_t section_id,
-                                             const knot_dname_t *sname, uint16_t stype);
-
 /**
  * Wildcard answer response check (RFC5155 7.2.6).
  * @param pkt          Packet structure to be processed.
index fde15bac843c7682dab2eb492dca9d310fb17352..7d8a8ce66e41c4ffa2ebf1edc3839494873855c1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit fde15bac843c7682dab2eb492dca9d310fb17352
+Subproject commit 7d8a8ce66e41c4ffa2ebf1edc3839494873855c1