Skip to content

Commit

Permalink
Output answer record name in ndjson instead of question
Browse files Browse the repository at this point in the history
  • Loading branch information
Marmelatze authored Nov 20, 2020
1 parent 7c4e30c commit 0b50765
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ void do_read(uint8_t *offset, size_t len, struct sockaddr_storage *recvaddr)
{
fputs(",", context.outfile);
}
json_escape_str(json_buffer, sizeof(json_buffer), dns_name2str(&packet.head.question.name));
json_escape_str(json_buffer, sizeof(json_buffer), dns_name2str(&rec.name));

fprintf(context.outfile,
"{\"ttl\":%" PRIu32 ",\"type\":\"%s\",\"class\":\"%s\",\"name\":\"%s\",\"data\":\"",
Expand Down

0 comments on commit 0b50765

Please sign in to comment.