Skip to content
Snippets Groups Projects
Commit 4a23a53d authored by Robert Edmonds's avatar Robert Edmonds
Browse files

Revert "dnsproxy: keep original qname letter case"

This reverts commit 7f3aa3f6.
parent 714307d7
No related merge requests found
......@@ -19,7 +19,6 @@
#include "knot/conf/schema.h"
#include "knot/query/capture.h" // Forces static module!
#include "knot/query/requestor.h" // Forces static module!
#include "knot/nameserver/process_query.h" // Forces static module!
#define MOD_REMOTE "\x06""remote"
#define MOD_ADDRESS "\x07""address"
......@@ -90,8 +89,7 @@ static knotd_state_t dnsproxy_fwd(knotd_state_t state, knot_pkt_t *pkt,
/* Capture layer context. */
const knot_layer_api_t *capture = query_capture_api();
struct capture_param capture_param = {
.sink = pkt,
.orig_qname = qdata->extra->orig_qname
.sink = pkt
};
/* Create a forwarding request. */
......
/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -36,15 +36,6 @@ static int begin(knot_layer_t *ctx, void *module_param)
static int prepare_query(knot_layer_t *ctx, knot_pkt_t *pkt)
{
assert(pkt && ctx && ctx->data);
struct capture_param *param = ctx->data;
// Restore to original QNAME if requested.
if (param->orig_qname != NULL && param->orig_qname[0] != '\0') {
memcpy(pkt->wire + KNOT_WIRE_HEADER_SIZE,
param->orig_qname, pkt->qname_size);
}
return KNOT_STATE_CONSUME;
}
......
/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -28,6 +28,5 @@ const knot_layer_api_t *query_capture_api(void);
* \brief Processing module parameters.
*/
struct capture_param {
knot_pkt_t *sink; /*!< Container for captured response. */
uint8_t *orig_qname; /*!< Original query name (case sensitive). */
knot_pkt_t *sink; /*!< Container for captured response. */
};
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