From f7c497c3a668ffe503c47ed5c5d9f653ad3c4a77 Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Sun, 10 Dec 2023 02:05:15 +0530 Subject: [PATCH] set field count to 0 --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 3be9d41..15a4b6d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,10 @@ fn main() { recv_packet.header.recursion_avail = false; recv_packet.header.reserved = 0; recv_packet.header.rcode = if recv_packet.header.opcode == 0 { 0 } else { 4 }; + recv_packet.header.qd_count = 0; + recv_packet.header.an_count = 0; + recv_packet.header.authority_records = 0; + recv_packet.header.additional_records = 0; recv_packet.write_to(&mut response);