1 From cbb5b17ad8e03e08ade62376a4f6a2066e55960d Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Tue, 23 Oct 2018 23:45:57 +0100
4 Subject: [PATCH 05/11] Fix logging in cf5984367bc6a949e3803a576512c5a7bc48ebab
6 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
8 src/rfc1035.c | 27 ++++++++++++++++++---------
9 1 file changed, 18 insertions(+), 9 deletions(-)
13 @@ -1335,7 +1335,6 @@ size_t answer_request(struct dns_header
15 unsigned long ttl = daemon->local_ttl;
17 - log_query(F_CONFIG | F_RRNAME, name, NULL, "<TXT>");
19 /* Dynamically generate stat record */
21 @@ -1345,11 +1344,14 @@ size_t answer_request(struct dns_header
25 - if (ok && add_resource_record(header, limit, &trunc, nameoffset, &ansp,
27 - T_TXT, t->class, "t", t->len, t->txt))
32 + log_query(F_CONFIG | F_RRNAME, name, NULL, "<TXT>");
33 + if (add_resource_record(header, limit, &trunc, nameoffset, &ansp,
35 + T_TXT, t->class, "t", t->len, t->txt))
41 @@ -1357,12 +1359,19 @@ size_t answer_request(struct dns_header
43 if (qclass == C_CHAOS)
45 - /* don't forward *.bind and *.server chaos queries */
46 + /* don't forward *.bind and *.server chaos queries - always reply with NOTIMP */
47 if (hostname_issubdomain("bind", name) || hostname_issubdomain("server", name))
50 - notimp = 1, auth = 0;
53 + notimp = 1, auth = 0;
56 + addr.addr.rcode.rcode = NOTIMP;
57 + log_query(F_CONFIG | F_RCODE, name, &addr, NULL);