Commit b3ac8c95 authored by Mark Karpilovskij's avatar Mark Karpilovskij

internet: a processing stage hack for geoip

parent 17d8c5de
......@@ -439,6 +439,7 @@ typedef enum {
/*! Query module processing stages. */
typedef enum {
KNOTD_STAGE_BEGIN = 0, /*!< Before query processing. */
KNOTD_STAGE_PREANSWER, /*!< Before section processing. */
KNOTD_STAGE_ANSWER, /*!< Answer section processing. */
KNOTD_STAGE_AUTHORITY, /*!< Authority section processing. */
KNOTD_STAGE_ADDITIONAL, /*!< Additional section processing. */
......
......@@ -584,6 +584,13 @@ static int answer_query(knot_pkt_t *pkt, knotd_qdata_t *qdata)
bool with_dnssec = have_dnssec(qdata);
/* Resolve PREANSWER. */
if (plan != NULL) {
WALK_LIST(step, plan->stage[KNOTD_STAGE_PREANSWER]) {
SOLVE_STEP(step->process, state, step->ctx);
}
}
/* Resolve ANSWER. */
knot_pkt_begin(pkt, KNOT_ANSWER);
SOLVE_STEP(solve_answer, state, NULL);
......
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