static WERROR handle_authoritative_recv(struct tevent_req *req)
{
- struct handle_authoritative_state *state = tevent_req_data(
- req, struct handle_authoritative_state);
WERROR werr;
if (tevent_req_is_werror(req, &werr)) {
return werr;
}
- werr = add_zone_authority_record(state->dns, state, state->question,
- state->nsrecs);
- if (!W_ERROR_IS_OK(werr)) {
- return werr;
- }
-
return WERR_OK;
}
struct dns_server_process_query_state *state = tevent_req_data(
req, struct dns_server_process_query_state);
WERROR werr;
+ WERROR werr2;
werr = handle_authoritative_recv(subreq);
TALLOC_FREE(subreq);
/* If you have run out of forwarders, simply finish */
if (state->forwarders == NULL) {
+ werr2 = add_zone_authority_record(state->dns,
+ state,
+ state->question,
+ &state->nsrecs);
+ if (tevent_req_werror(req, werr2)) {
+ DBG_WARNING("Failed to add SOA record: %s\n",
+ win_errstr(werr2));
+ return;
+ }
+
+ state->ancount = talloc_array_length(state->answers);
+ state->nscount = talloc_array_length(state->nsrecs);
+ state->arcount = talloc_array_length(state->additional);
+
tevent_req_werror(req, werr);
return;
}
return;
}
+ werr2 = add_zone_authority_record(state->dns,
+ state,
+ state->question,
+ &state->nsrecs);
+ if (tevent_req_werror(req, werr2)) {
+ DBG_WARNING("Failed to add SOA record: %s\n",
+ win_errstr(werr2));
+ return;
+ }
+
state->ancount = talloc_array_length(state->answers);
state->nscount = talloc_array_length(state->nsrecs);
state->arcount = talloc_array_length(state->additional);