2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

329 Commits

Author SHA1 Message Date
Brian Wellington
91268e69b0 Don't directly access the TSIG field of the message. 2000-05-31 23:57:45 +00:00
Brian Wellington
75f6c57d95 When an rdataset is signed, its ttl is normalized based on the signature
validity period.
2000-05-31 22:01:39 +00:00
Brian Wellington
0f80bfec68 The message code now has functions to manipulate TSIG and SIG(0), and the
callers use these functions.  Also a lot of TSIG cleanup.
2000-05-30 23:14:57 +00:00
Andreas Gustafsson
7cd4c3ddd1 The 'cache-ttl' and 'ncache-ttl' options now work 2000-05-26 23:17:56 +00:00
Michael Graff
bd81a43c73 drop ::1.2.3.4 and ::ffff:1.2.3.4 in the resolver, not the adb. 2000-05-26 02:16:10 +00:00
Brian Wellington
af60263664 Added dns_tsigkey_attach & _detach, to simplify reference counting.
Added dns_message_get/settsigkey to deuglify tsig key handling in message code.
2000-05-26 00:16:46 +00:00
David Lawrence
ed019cabc1 fixed lines > 79 columns wide 2000-05-24 05:10:00 +00:00
Michael Graff
46993e1d9d Merge the mlg-20000518 branch onto the mainline. Change summary:
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.
2000-05-19 21:46:46 +00:00
Andreas Gustafsson
64527927ac bind TCP socket to wildcard address; delay creation of
TCP dispatch until socket is connected
2000-05-17 20:33:29 +00:00
David Lawrence
57d32ef99d In fctx_query, if dns_dispatch_create fails jump to cleanup_query instead
of cleanup_dispatch; there is no query->dispatch to clean up.
2000-05-17 00:00:55 +00:00
Andreas Gustafsson
27fd91edc3 enabled previously #if 0'ed-out code to bind resolver sockets to
the wildcard address, as a temporary (?) fix for the server failing with
'socket is not bound' during startup
2000-05-15 05:09:13 +00:00
David Lawrence
971f454bbd Fixed these warnings:
"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.
2000-05-14 02:27:26 +00:00
Michael Graff
ca9739800f implement dns_dispatchmgr_t, replacing dns_dispatchlist_t. Use it throughout the library/server. 2000-05-10 21:34:50 +00:00
David Lawrence
1a69a1a78c Megacommit of dozens of files.
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.
    */
2000-05-08 14:38:29 +00:00
Andreas Gustafsson
bffbdf7545 cache all response RRs before validating 2000-05-05 17:26:47 +00:00
Andreas Gustafsson
62fb5eccb5 pass query type to negative response validator 2000-05-05 00:19:00 +00:00
Andreas Gustafsson
88b0c72919 validator support code checkpoint: cache negative validation results;
don't access freed ftcx when validation canceled
2000-05-04 16:38:09 +00:00
Andreas Gustafsson
c9373cc535 checkpoint: call validator for negative responses 2000-05-02 18:10:19 +00:00
David Lawrence
6e49e91bd0 103. [func] libisc buffer API changes for <isc/buffer.h>:
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.
2000-04-27 00:03:12 +00:00
Bob Halley
7525fa78c0 add XXXRTH comment about sending to ourselves 2000-04-26 19:25:01 +00:00
Brian Wellington
ec371edc34 Add 'type' as a parameter to dns_validator_create() 2000-04-20 20:43:52 +00:00
Andreas Gustafsson
ad4e4fe2a3 cache_name() sometimes returned DNS_R_UNCHANGED instead of DNS_R_SUCCESS,
causing some queries to secure domains to return SERVFAIL
2000-04-20 17:56:03 +00:00
Andreas Gustafsson
06fd648cf2 echeckpoint: check for shutdown condition in
validated(); purge posted timer events when stopping the idle timer
2000-04-20 17:05:37 +00:00
Brian Wellington
605b13c0dc Removed the restriction that answers under a security root must have SIG
records in the answer, since they might be in an unsecure subdomain.
2000-04-18 17:44:22 +00:00
Mark Andrews
1a1a2ad3e8 add dns_resolver_dispatchv4(), dns_resolver_dispatchv6() and
dns_resolver_socketmgr().
2000-04-18 08:30:24 +00:00
Michael Graff
0d89e0d55c fix a bug where ev_sender wasn't properly set, and convert sender, arg, action, etc. to ev_sender, ev_arg, ev_action, etc. 2000-04-17 19:21:30 +00:00
Andreas Gustafsson
fa44c25a93 checkpoint: the validated() function now does its thing
for positive validations, but does not yet handle things like shutdown
correctly
2000-04-13 22:35:49 +00:00
Brian Wellington
b5fff54fe9 SIG records were not properly negatively cached. 2000-04-13 17:01:19 +00:00
Andreas Gustafsson
3ae7579332 If a fetch with sigrdataset==NULL joined one with sigrdataset!=NULL
or vice versa, the resolver could catch an assertion or lose signature data,
respectively.
2000-04-13 16:43:02 +00:00
Brian Wellington
9c418665dd Responses containing multiple names in the authority section were not
negatively cached.
2000-04-12 19:27:15 +00:00
Bob Halley
738b9aa3de isc_task_create() API change 2000-04-12 01:41:21 +00:00
Andreas Gustafsson
1723fbf70a use the UNUSED() macro 2000-04-11 23:15:30 +00:00
Brian Wellington
48ba496518 Uncomment the dnssec validator related code that compiles. Without a
way to fill in the security roots tree, this code will not be called
yet in practice.
2000-04-07 17:34:28 +00:00
Michael Graff
4195904998 s/DNS_R_/ISC_R_/ change for some codes. 2000-04-06 22:03:35 +00:00
Brian Wellington
404e3e4738 SIGs weren't returned in the answer section when the query resulted in a fetch. 2000-04-04 21:13:45 +00:00
Bob Halley
1b4d50a081 When making an OPT RR, initialize rdata's type and rdclass fields to avoid
triggering an assertion.
2000-03-29 18:53:57 +00:00
Bob Halley
f187c911b8 use keytables 2000-03-16 23:59:33 +00:00
Brian Wellington
37d86b4a61 The resolver can now sign outgoing messages based on peer keys (from
the server keys statement).
2000-03-03 19:48:14 +00:00
Bob Halley
5300bfe023 We now check for queries which require EDNS, and don't try them without
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.
2000-02-19 00:16:41 +00:00
Michael Graff
69a7905cf3 return 'avoid_bitstring' in dns_adbaddrinfo_t. If non-zero, the timer hasn't expired.
This means we need to pass 'now' into dns_adb_findaddrinfo() as well, to filter
out timers that have expired.
2000-02-16 00:16:36 +00:00
Bob Halley
b3fb6d6a29 lint 2000-02-14 23:19:45 +00:00
Bob Halley
cec8578e67 The fctx lifetime timer was not running a certain times. In particular, it
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.
2000-02-11 21:10:40 +00:00
Bob Halley
b599cfd793 RTT penalization was not happening for the nonresponding servers in
the very common case where some server responded with the answer.
This would prevent avoidance of the nonresponding servers,
significantly increasing latency.
2000-02-11 19:58:11 +00:00
Bob Halley
3f101f4e70 bad server support 2000-02-11 03:06:56 +00:00
Bob Halley
8f0c8ee6c6 If a referral doesn't make progress, don't follow it. 2000-02-07 22:25:04 +00:00
Bob Halley
7d32c065c7 update copyright 2000-02-03 23:50:32 +00:00
Bob Halley
712e318f76 The resolver didn't handle dispatcher events with non-success result codes
correctly.
2000-02-03 22:48:30 +00:00
Bob Halley
624f129514 An fctx that is shutting down should not be in ADDRWAIT mode. 2000-02-03 22:24:18 +00:00
Bob Halley
628b315462 If we have no addresses at all, but some have been pruned by the
ADB due to lameness, turn off lameness checking and try again.
2000-02-03 00:01:08 +00:00
Michael Graff
1a0e33bc20 implement DNS_ADBFIND_GLUEOK, DNS_ADBFIND_HINTOK, and DNS_ADBFIND_IGNORELAME 2000-02-02 23:24:04 +00:00