DNSCreateRcodeString(tx->rcode, rcode, sizeof(rcode));
json_object_set_new(js, "rcode", json_string(rcode));
- /* Log the query rrname. Mostly useful on error, but still
- * useful. */
+ /* Log the query rrname and rrtype. Mostly useful on error, but
+ * still useful. */
DNSQueryEntry *query = TAILQ_FIRST(&tx->query_list);
if (query != NULL) {
char *c;
json_object_set_new(js, "rrname", json_string(c));
SCFree(c);
}
+ char rrtype[16] = "";
+ DNSCreateTypeString(query->type, rrtype, sizeof(rrtype));
+ json_object_set_new(js, "rrtype", json_string(rrtype));
}
if (flags & LOG_FORMAT_DETAILED) {