Commit ec9a9c0e authored by Marek Vavrusa's avatar Marek Vavrusa

Fix for empty NSID allocation.

parent 15b03d43
......@@ -1604,8 +1604,6 @@ int zones_normal_query_answer(knot_nameserver_t *nameserver,
rcu_read_unlock();
return KNOT_EOK;
}
knot_ns_error_response_full(nameserver, resp, rcode, resp_wire,
rsize);
} else {
/*
* Now we have zone. Verify TSIG if it is in the packet.
......
......@@ -404,7 +404,7 @@ int knot_response_add_opt(knot_packet_t *resp,
* other options are supported.
*/
if (add_nsid) {
if (add_nsid && opt_rr->option_count > 0) {
resp->opt_rr.option_count = opt_rr->option_count;
assert(resp->opt_rr.options == NULL);
resp->opt_rr.options = (knot_opt_option_t *)malloc(
......
Markdown is supported
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