Commit 8943ff62 authored by Mark Andrews's avatar Mark Andrews

2130. [func] Log if CD or DO were set. [RT #16640]

parent 0b174d12
2130. [func] Log if CD or DO were set. [RT #16640]
2129. [func] Provide a pool of UDP sockets for queries to be
made over. See use-queryport-pool, queryport-pool-ports
and queryport-pool-updateinterval. [RT #16415]
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.292 2007/01/08 02:45:04 marka Exp $ */
/* $Id: query.c,v 1.293 2007/02/06 04:00:21 marka Exp $ */
/*! \file */
......@@ -4388,7 +4388,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
}
static inline void
log_query(ns_client_t *client) {
log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
char namebuf[DNS_NAME_FORMATSIZE];
char typename[DNS_RDATATYPE_FORMATSIZE];
char classname[DNS_RDATACLASS_FORMATSIZE];
......@@ -4405,10 +4405,12 @@ log_query(ns_client_t *client) {
dns_rdatatype_format(rdataset->type, typename, sizeof(typename));
ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY,
level, "query: %s %s %s %s%s%s", namebuf, classname,
level, "query: %s %s %s %s%s%s%s%s", namebuf, classname,
typename, WANTRECURSION(client) ? "+" : "-",
(client->signer != NULL) ? "S": "",
(client->opt != NULL) ? "E" : "");
(client->opt != NULL) ? "E" : "",
((extflags & DNS_MESSAGEEXTFLAG_DO) != 0) ? "D" : "",
((flags & DNS_MESSAGEFLAG_CD) != 0) ? "C" : "");
}
void
......@@ -4418,6 +4420,8 @@ ns_query_start(ns_client_t *client) {
dns_rdataset_t *rdataset;
ns_client_t *qclient;
dns_rdatatype_t qtype;
unsigned int saved_extflags = client->extflags;
unsigned int saved_flags = client->message->flags;
CTRACE("ns_query_start");
......@@ -4490,7 +4494,7 @@ ns_query_start(ns_client_t *client) {
}
if (ns_g_server->log_queries)
log_query(client);
log_query(client, saved_flags, saved_extflags);
/*
* Check for multiple question queries, since edns1 is dead.
......
......@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- File: $Id: Bv9ARM-book.xml,v 1.313 2007/02/02 02:18:05 marka Exp $ -->
<!-- File: $Id: Bv9ARM-book.xml,v 1.314 2007/02/06 04:00:21 marka Exp $ -->
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<title>BIND 9 Administrator Reference Manual</title>
......@@ -4200,15 +4200,18 @@ category notify { null; };
enable query logging unless <command>querylog</command> option has been
specified.
</para>
<para>
The query log entry reports the client's IP address and
port number, and the
query name, class and type. It also reports whether the
Recursion Desired
flag was set (+ if set, - if not set), EDNS was in use
(E) or if the
query was signed (S).
</para>
<para>
the query log entry reports the client's IP
address and port number, and the query name,
class and type. It also reports whether the
Recursion Desired flag was set (+ if set, -
if not set), if the query was signed (S),
EDNS was in use (E), if DO (DNSSSEC ok) was
set (D), or if CD (checking disabled) was set
(C).
</para>
<para>
<computeroutput>client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</computeroutput>
</para>
......
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