Skip to content
Snippets Groups Projects
Commit 78321894 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

lib/utils: clear rrcounts in packet recycle

parent 84f43a1e
No related merge requests found
...@@ -172,6 +172,10 @@ int kr_pkt_recycle(knot_pkt_t *pkt) ...@@ -172,6 +172,10 @@ int kr_pkt_recycle(knot_pkt_t *pkt)
pkt->rrset_count = 0; pkt->rrset_count = 0;
pkt->size = KNOT_WIRE_HEADER_SIZE; pkt->size = KNOT_WIRE_HEADER_SIZE;
pkt->current = KNOT_ANSWER; pkt->current = KNOT_ANSWER;
knot_wire_set_qdcount(pkt->wire, 0);
knot_wire_set_ancount(pkt->wire, 0);
knot_wire_set_nscount(pkt->wire, 0);
knot_wire_set_arcount(pkt->wire, 0);
memset(pkt->sections, 0, sizeof(pkt->sections)); memset(pkt->sections, 0, sizeof(pkt->sections));
knot_pkt_begin(pkt, KNOT_ANSWER); knot_pkt_begin(pkt, KNOT_ANSWER);
return knot_pkt_parse_question(pkt); return knot_pkt_parse_question(pkt);
......
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