- Multiple DNAME records with the same owner exist (:rfc:`6672`)
- NS record exists together with a DNAME record (:rfc:`6672`)
- DS record exists at the zone apex (:rfc:`3658`)
+- DELEG record exists at the zone apex (TBD)
(*) The marked check can't be weakened by the soft mode. All other mandatory checks
are subject to the optional soft mode.
[SEM_ERR_DNAME_EXTRA_NS] =
"NS record exists beside DNAME",
+ [SEM_ERR_DELEG_APEX] =
+ "DELEG at the zone apex",
+
[SEM_ERR_NS_APEX] =
"missing NS at the zone apex",
[SEM_ERR_NS_GLUE] =
static int check_nsec3param(const zone_node_t *node, semchecks_data_t *data);
static int check_submission(const zone_node_t *node, semchecks_data_t *data);
static int check_ds(const zone_node_t *node, semchecks_data_t *data);
+static int check_deleg(const zone_node_t *node, semchecks_data_t *data);
struct check_function {
int (*function)(const zone_node_t *, semchecks_data_t *);
{ check_dname, MANDATORY | SOFT },
{ check_delegation, MANDATORY | SOFT }, // mandatory for apex, optional for others
{ check_ds, MANDATORY | SOFT }, // mandatory for apex, optional for others
+ { check_deleg, MANDATORY | SOFT }, // mandatory for apex
{ check_nsec3param, DNSSEC },
{ check_submission, DNSSEC },
};
return KNOT_EOK;
}
+static int check_deleg(const zone_node_t *node, semchecks_data_t *data)
+{
+ if (data->zone->apex != node) {
+ return KNOT_EOK;
+ }
+
+ const knot_rdataset_t *deleg_rrs = node_rdataset(node, KNOT_RRTYPE_DELEG);
+ if (deleg_rrs != NULL) {
+ data->handler->error = true;
+ data->handler->cb(data->handler, data->zone, node->owner,
+ SEM_ERR_DELEG_APEX, NULL);
+ }
+
+ return KNOT_EOK;
+}
+
static int check_soa(const zone_node_t *node, semchecks_data_t *data)
{
if (data->zone->apex != node) {
NS_APEX="missing NS at the zone apex"
NS_GLUE="missing glue record"
RRSIG_UNVERIFIABLE="no valid signature for a record"
+DELEG_APEX="DELEG at the zone apex"
plan_lazy
expect_error "dname_multiple.zone" 1 1 "$DNAME_MULTIPLE"
expect_error "dname_extra_ns.zone" 1 1 "$DNAME_EXTRA_NS"
expect_error "ds_apex.zone" 1 1 "$DS_APEX"
+expect_error "deleg_apex.zone" 1 1 "$DELEG_APEX"
expect_error "ns_apex.missing" 0 1 "$NS_APEX"
expect_error "glue_apex_both.missing" 0 2 "$NS_GLUE"