Skip to content
Snippets Groups Projects
Commit b5fd1a61 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

kdig: checking QR bit on response

parent 3dd88d61
No related merge requests found
......@@ -450,6 +450,13 @@ static bool check_reply_id(const knot_pkt_t *reply,
return true;
}
static void check_reply_qr(const knot_pkt_t *reply)
{
if (!knot_wire_get_qr(reply->wire)) {
WARN("response QR bit not set\n");
}
}
static void check_reply_question(const knot_pkt_t *reply,
const knot_pkt_t *query)
{
......@@ -648,6 +655,9 @@ static int process_query_packet(const knot_pkt_t *query,
// Check for question sections equality.
check_reply_question(reply, query);
// Check QR bit
check_reply_qr(reply);
// Print reply packet.
print_packet(reply, net, in_len, time_diff_ms(&t_query, &t_end), 0,
true, style);
......@@ -918,6 +928,9 @@ static int process_xfr_packet(const knot_pkt_t *query,
// Check for question sections equality.
check_reply_question(reply, query);
// Check QR bit
check_reply_qr(reply);
}
msg_count++;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment