Skip to content

Commit

Permalink
query.c: log query ports and IDs in hex
Browse files Browse the repository at this point in the history
  • Loading branch information
fanf2 committed Sep 11, 2012
1 parent 5ba32bb commit 8295e34
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/named/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -7247,15 +7247,18 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
isc_netaddr_format(&client->destaddr, onbuf, sizeof(onbuf));

ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY,
level, "query: %s %s %s %s%s%s%s%s%s (%s)", namebuf,
classname, typename, WANTRECURSION(client) ? "+" : "-",
level, "query: %s %s %s %s%s%s%s%s%s (%s) [%04x:%04x]",
namebuf, classname, typename,
WANTRECURSION(client) ? "+" : "-",
(client->signer != NULL) ? "S": "",
(client->opt != NULL) ? "E" : "",
((client->attributes & NS_CLIENTATTR_TCP) != 0) ?
"T" : "",
((extflags & DNS_MESSAGEEXTFLAG_DO) != 0) ? "D" : "",
((flags & DNS_MESSAGEFLAG_CD) != 0) ? "C" : "",
onbuf);
onbuf,
isc_sockaddr_getport(&client->peeraddr),
client->message->id);
}

static inline void
Expand Down

0 comments on commit 8295e34

Please sign in to comment.