[PATCH v2 5/5] dns: always add authority records

Stefan Metzmacher metze at samba.org
Thu Jul 30 21:05:00 UTC 2015


Hi Kai,

> @@ -673,7 +677,9 @@ struct tevent_req *dns_server_process_query_send(
>  				      &state->answers, &state->ancount,
>  				      &state->nsrecs, &state->nscount);
>  		if (tevent_req_werror(req, err)) {
> -			return tevent_req_post(req, ev);
> +			if (!W_ERROR_EQUAL(err, DNS_ERR(NAME_ERROR))) {
> +				return tevent_req_post(req, ev);
> +			}

This is wrong,

You need to check if (!W_ERROR_EQUAL(err, DNS_ERR(NAME_ERROR)))
before tevent_req_werror(req, err).

Maybe (but I'm not sure...):

if (!W_ERROR_EQUAL(err, DNS_ERR(NAME_ERROR))) {
	tevent_req_werror(req, err);
	return tevent_req_post(req, ev);
}

The rule is that after tevent_req_werror() (returning true)
you have to return immediately doing absolute nothing before the return.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150730/ee6d6032/signature.sig>


More information about the samba-technical mailing list