Skip to content
Snippets Groups Projects
Commit 41a96927 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Added check for identical SOA.

Refs #1224
parent 2712b3b8
No related branches found
No related tags found
No related merge requests found
......@@ -1620,7 +1620,16 @@ int process_rr(void)
if ((current_rrset->type == KNOT_RRTYPE_SOA) && (zone != NULL)) {
if (knot_node_rrset(knot_zone_contents_apex(contents),
KNOT_RRTYPE_SOA) != NULL) {
return KNOTDZCOMPILE_ESOA;
/* Receiving another SOA. */
if (knot_rrset_compare(current_rrset,
knot_node_rrset(knot_zone_contents_apex(contents),
KNOT_RRTYPE_SOA), KNOT_RRSET_COMPARE_WHOLE) != 0) {
return KNOTDZCOMPILE_ESOA;
} else
{
zc_warning_prev_line("encountered identical "
"extra SOA record");
}
}
}
......
......@@ -117,6 +117,7 @@ extern zparser_type *parser;
/* used in zonec.lex */
void zc_error_prev_line(const char *fmt, ...);
void zc_warning_prev_line(const char *fmt, ...);
/*!
* \brief Does all the processing of RR - saves to zone, assigns RRSIGs etc.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment