Commit d71a4443 authored by Lubos Slovak's avatar Lubos Slovak

Fixed wrong AXFR-style IXFR response.

- Response had the header cleared (no ID and no QR flag).
- Also, the Question was wrongly set to AXFR. It should remain IXFR
  although the response is in AXFR format. (See RFC1995, Section 4)
parent bebafa83
......@@ -618,7 +618,6 @@ 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) {
......@@ -641,11 +640,6 @@ int ixfr_query(knot_pkt_t *pkt, struct query_data *qdata)
case KNOT_ERANGE: /* No history -> AXFR. */
IXFROUT_LOG(LOG_INFO, "incomplete history, fallback to AXFR");
knot_pkt_put_question(pkt, knot_pkt_qname(query),
qdata->packet_type = KNOT_QUERY_AXFR; /* Solve as AXFR. */
return axfr_query_process(pkt, qdata);
default: /* Server errors. */
IXFROUT_LOG(LOG_ERR, "failed to start (%s)", knot_strerror(ret));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment