Skip to content
Snippets Groups Projects
Commit 9e58d371 authored by Vitezslav Kriz's avatar Vitezslav Kriz Committed by Jan Včelák
Browse files

mandatory semantic checks for axfr and ixfr transfer

parent b227b50e
No related branches found
No related tags found
1 merge request!510Semantic checks
......@@ -323,6 +323,16 @@ static int axfr_answer_finalize(struct answer_data *adata)
return rc;
}
err_handler_t handler;
err_handler_init(&handler);
rc = zone_do_sem_checks(proc->contents, false, &handler);
err_handler_log_errors(&handler);
err_handler_deinit(&handler);
if (rc != KNOT_EOK) {
return rc;
}
/* Switch contents. */
zone_t *zone = adata->param->zone;
zone_contents_t *old_contents =
......
......@@ -389,12 +389,15 @@ static int ixfrin_finalize(struct answer_data *adata)
return ret;
}
err_handler_t err_handler;
err_handler_init(&err_handler);
ret = zone_do_sem_checks(new_contents, 0, &err_handler, NULL, NULL);
err_handler_t handler;
err_handler_init(&handler);
ret = zone_do_sem_checks(new_contents, false, &handler);
err_handler_log_errors(&handler);
err_handler_deinit(&handler);
if (ret != KNOT_EOK) {
IXFRIN_LOG(LOG_WARNING, "failed to apply changes to zone (%s)",
knot_strerror(KNOT_ESEMCHECK));
knot_strerror(ret));
update_rollback(&a_ctx);
update_free_zone(&new_contents);
return ret;
......
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