Skip to content
Snippets Groups Projects
Commit 6300c7a3 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

ixfr: rewrite QTYPE for AXFR fallback

parent 9688f6fd
No related branches found
No related tags found
No related merge requests found
......@@ -567,6 +567,7 @@ int ixfr_query(knot_pkt_t *pkt, struct query_data *qdata)
int ret = KNOT_EOK;
struct timeval now = {0};
struct ixfr_proc *ixfr = (struct ixfr_proc*)qdata->ext;
knot_pkt_t *query = qdata->query;
/* If IXFR is disabled, respond with SOA. */
if (qdata->param->proc_flags & NS_QUERY_NO_IXFR) {
......@@ -589,6 +590,10 @@ int ixfr_query(knot_pkt_t *pkt, struct query_data *qdata)
case KNOT_ERANGE: /* No history -> AXFR. */
case KNOT_ENOENT:
IXFROUT_LOG(LOG_INFO, "Incomplete history, fallback to AXFR.");
knot_pkt_clear(pkt);
knot_pkt_put_question(pkt, knot_pkt_qname(query),
knot_pkt_qclass(query),
KNOT_RRTYPE_AXFR);
qdata->packet_type = KNOT_QUERY_AXFR; /* Solve as AXFR. */
return axfr_query_process(pkt, qdata);
default: /* Server errors. */
......
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