* 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 */
}
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];
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
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");
}
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.
- 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>
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>