Skip to content
Snippets Groups Projects
Commit fa38130b authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

dig: log correct query/response addresses for dnstap log

parent 065e5f30
No related branches found
No related tags found
No related merge requests found
......@@ -284,7 +284,15 @@ static int dump_dnstap(dt_writer_t *writer,
return KNOT_EOK;
}
ret = dt_message_fill(&msg, msg_type, NULL, net->srv->ai_addr,
const struct sockaddr *qa = NULL;
const struct sockaddr *ra = NULL;
if (msg_type == DNSTAP__MESSAGE__TYPE__TOOL_QUERY) {
qa = net->srv->ai_addr;
} else if (msg_type == DNSTAP__MESSAGE__TYPE__TOOL_RESPONSE) {
ra = net->srv->ai_addr;
}
ret = dt_message_fill(&msg, msg_type, qa, ra,
net->srv->ai_protocol, wire, wire_len,
qtime, rtime);
if (ret == KNOT_EOK) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment