state. Set DNS_DISPATCHATTR_CONNECTED when calling
dns_dispatch_createtcp() for connected TCP sockets
or call dns_dispatch_starttcp() when the socket is
connected.
error during shutdown of a busy caching server (specifically, one
making many outgoing TCP connections).
Bug 1: resquery_destroy() accessed query->fctx->res->mctx, even though
query->fctx could already be destroyed at this point.
Bug 2: resquery_connected() called fctx_done(query->fctx, result)
immediately after fctx_cancelquery(), which could destroy *query.
Also added some explanatory comments.
cast to dns_rdatatype_t via macros of their same name
so that they are of the proper integral type wherever
a dns_rdatatype_t is needed.
(And a few prototypes that I recently bogusly changed to take "int" parameters
in place of "dns_rdatatype_t" to accomodate the type of an enum identifier
have been reverted to again properly take a dns_rdatatype_t.)
Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const. Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.
The macro DE_CONST is used to deal with a handful of very special
places where something is qualified as const but really needs to have
its const qualifier removed.
rdata.c now defines macros for the prototypes of the basic rdata functions,
and all of the lib/dns/rdata/**/*.c files now use them.
Some minor integer-compatibility issues. (IE, ~0x03 is a signed int,
so assigning it to an unsigned int should use a cast. The type of an
enum member is int, so there are some conversion issues there, too.)
A pointers-to-function should not be cast to a pointer-to-object.
Variables should not be named for C reserved identifiers.
One or two set-but-not-used variables removed.
Minor other ISC style cleanups.
dns_dispatch_create() no longer exists. dns_dispatch_createtcp()
and dns_dispatch_getudp() are the replacements. _createtcp() takes
a bound, connected TCP socket, while _getudp() will search for
a sharable UDP socket, and if found, attach to it and return a
pointer to it. If one is not found, it will create a udp socket,
bind it to a supplied local address, and create a new dispatcher
around it.
dns_dispatch_remove{request,response}() no longer take the dispatch
as an argument.
query-source can now be set per view.
The dispatch manager holds onto three memory pools, one for
allocating dispatchers from, one for events, and one for
requests/replies. The free list on these pools is hard-coded,
but set to 1024. This keeps us from having to dig into the
isc_mem_t the pools draw from as often.
dns_resolver_create() and dns_view_createresolver() require that
valid dispatchers be passed in; dispatchers are no longer created
for the caller.
"resolver.c", line 750: remark(1552): variable "trdataset" was set but never
used
"resolver.c", line 3043: remark(1552): variable "have_sig" was set but never
used
True and true.
"resolver.c", line 2194: warning(1551): variable "now" is used before its
value is set
Moved setting of "now" to earlier in the function.
Cleanup of redundant/useless header file inclusion.
ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
/*
* This is a comment.
*/
Added:
isc_buffer_base(b) (pointer)
isc_buffer_current(b) (pointer)
isc_buffer_active(b) (pointer)
isc_buffer_used(b) (pointer)
isc_buffer_length(b) (int)
isc_buffer_usedlength(b) (int)
isc_buffer_consumedlength(b) (int)
isc_buffer_remaininglength(b) (int)
isc_buffer_activelength(b) (int)
isc_buffer_availablelength(b) (int)
Removed:
ISC_BUFFER_USEDCOUNT(b)
ISC_BUFFER_AVAILABLECOUNT(b)
isc_buffer_type(b)
Changed names:
isc_buffer_used(b, r) ->
isc_buffer_usedregion(b, r)
isc_buffer_available(b, r) ->
isc_buffer_available_region(b, r)
isc_buffer_consumed(b, r) ->
isc_buffer_consumedregion(b, r)
isc_buffer_active(b, r) ->
isc_buffer_activeregion(b, r)
isc_buffer_remaining(b, r) ->
isc_buffer_remainingregion(b, r)
Buffer types were removed, so the ISC_BUFFERTYPE_*
macros are no more, and the type argument to
isc_buffer_init and isc_buffer_allocate were removed.
isc_buffer_putstr is now void (instead of isc_result_t)
and requires that the caller ensure that there
is enough available buffer space for the string.
EDNS if the remote server doesn't understand EDNS.
In certain error cases during the construction of a query the resolver tried
to free data twice.
Set AD and CD when making EDNS queries.
If resquery_send() fails after a TCP connection is established, fail the fctx
the same way we do for the UDP case.
Revisions in preparation for DNSSEC validation.
If we get a non-EDNS-related FORMERR from a server that is not a forwarder,
assume that all servers for the zone will return FORMERR.
Cope with YXDOMAIN.
was not running for fctxs in the addrwait state. If the underlying ADB finds
never timed out (which is possible since they generate fetches), the fctx
would exist until the server was shutdown.
the very common case where some server responded with the answer.
This would prevent avoidance of the nonresponding servers,
significantly increasing latency.