Commit graph

830 commits

Author SHA1 Message Date
Brian Wellington
41faaa9b35 If an incoming message contains a SIG(0), store the rdataset owner name
in the message structure, even though it should be the root.  Also,
return this name in dns_message_getsig0().
2000-05-23 23:35:54 +00:00
Mark Andrews
00b67c06b9 Add contract notes for dns_requestmgr_{attach,detach}(). 2000-05-23 00:11:45 +00:00
Michael Sawyer
1ed4ba5a1f Add pseudosection printing, and dns_message_pseudosectiontotext(). 2000-05-22 21:22:06 +00:00
Andreas Gustafsson
cd01c9716f Reintroduced separate internal/external reference counts for zones,
reversing part of the changes made on 2000/05/17.  Doing an explicit
zone shutdown on destruction of the zone table caused the zone to
be shut down prematurely on server reload when the zone table was
destroyed but the zone had already been attached to a new zone table.
An external reference count is needed to correctly handle this situation.
2000-05-22 17:23:15 +00:00
Mark Andrews
0103f42343 Add comment about requiring pointers to memory block to be NULL if the
corresponding length is 0, non-NULL otherwise.
2000-05-22 12:34:16 +00:00
Michael Graff
341323e0e7 move dns_db_getsoaserial() from journal.c to db.c 2000-05-20 01:32:03 +00:00
Michael Sawyer
9dca36b2ab Remove unused no_rdata_or_ttl flag from message_totext and message_sectiontotest routines. 2000-05-20 01:29:58 +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
Brian Wellington
e49c834de8 Replaced dns_keynode_next by the more correct dns_keytable_findnextkeynode 2000-05-19 20:25:55 +00:00
Brian Wellington
ea14aa24aa added dns_keynode_next 2000-05-19 18:38:27 +00:00
James Brister
8977ab7ca0 Zone configuration validation is now done at end of config file parsing,
and before loading callbacks.
2000-05-18 23:20:21 +00:00
Mark Andrews
59abb512d3 186 [func] dns_request_getresponse() has an additional arguement
'preserve_order'.
2000-05-18 02:59:20 +00:00
Brian Wellington
2ee24549b3 Added DNS_R_NOTINSECURE 2000-05-18 01:42:40 +00:00
Andreas Gustafsson
22608315e8 Fixed multiple shutdown cleanup bugs in the zone object. This
involved extensive restructuring of the reference counting of
zones and related objects.

Zones now attach to their views.  To avoid a circular dependency that
would keep views from ever shutting down, this is done using the new
functions dns_view_weakattach() / dns_view_weakdetach() which
guarantee that the view will not be freed but still allow it
to be shut down.

The zones themselves now only have a single reference count, with
similar "weak" semantics.  Managed zones must now be shut down
explicitly by calling dns_zone_shutdown().  To shut down all
zones in a zone table, call dns_zt_shutdown().

The zone manager is now reference counted, weakly. To shut down the
zone manager, you must explicitly call dns_zonemgr_shutdown().
2000-05-17 19:45:36 +00:00
David Lawrence
34b394b43e DNS_R_RANGE -> ISC_R_RANGE 2000-05-15 21:14:38 +00:00
Michael Sawyer
c95a89b433 Added dns_message_sectiontotext() and dns_message_totext() functions. 2000-05-15 17:49:57 +00:00
James Brister
4932a54ed6 - options named.conf statement *must* now come before any zone or view
statements.

- Post-load of named.conf check verifies a slave zone has non-empty list
  of masters defined.

- New per-zone boolean:

	enable-zone yes | no ;

- intended to let a zone be disabled without having to comment out the
  entire zone statement.

- New global and per-view option:

	max-cache-ttl number

- New global and per-view option:

	addition-data internal | minimal | maximal;
2000-05-15 12:36:33 +00:00
Andreas Gustafsson
f7d85bae58 Keep a queue of zones waiting for zone transfer quota so that a new
transfer can be dispatched immediately whenever quota becomes available
2000-05-14 20:01:34 +00:00
Andreas Gustafsson
7c74a7745d comments for dns_zone_setmasters() and dns_zone_setnotify()
said they add to a list; this is no longer true, they now set the whole list
2000-05-13 17:54:37 +00:00
Andreas Gustafsson
e1f16346db validator must not indicate a validation failure by returning
ISC_R_NOTFOUND as that seriously confuses query_find().  Introduced new
result codes DNS_R_NOVALIDSIG and DNS_R_NOVALIDNXT to use instead.
2000-05-12 21:25:17 +00:00
Mark Andrews
8adf1b9e74 Checkpoint ratelimiting refresh queries and notifies.
170.   [cleanup]       Remove inter server consistancy checks from zone,
                        these should return as a seperate module in 9.1.
                        dns_zone_checkservers(), dns_zone_checkparents(),
                        dns_zone_checkchildren(), dns_zone_checkglue().

                        Remove dns_zone_setadb(), dns_zone_setresolver(),
                        dns_zone_setrequestmgr() these should now be found
                        via the view.
2000-05-11 10:04:59 +00:00
Michael Graff
b9c8f4378a Add address searching to dns_disptach_find(). 2000-05-11 07:33:17 +00:00
Michael Graff
202ea9ccee make magic numbers be the first things in the structures 2000-05-10 23:58:12 +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
Michael Graff
bc892aec31 implement _find() 2000-05-10 17:26:23 +00:00
Michael Graff
abf30e12ba declare dns_dispatchlist_t here 2000-05-10 17:24:55 +00:00
Michael Graff
1cf2ee1ef0 snapshot; dispatch list stuff 2000-05-10 07:28:33 +00:00
Andreas Gustafsson
84fcfe530b new logging module DNS_LOGMODULE_MASTERDUMP 2000-05-09 23:31:12 +00:00
Mark Andrews
8b61d20120 convert TRACE -> logging: ISC_LOG_DEBUG(3) 2000-05-09 05:12:49 +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
James Brister
65c9645ca7 Support new 'database' statement in zone.
database "quoted-string";
2000-05-06 10:18:48 +00:00
Andreas Gustafsson
a726ac16b3 updated comments 2000-05-05 00:18:16 +00:00
Michael Graff
c90f5e8d1e Split dns_log_init() into dns_log_init() which sets up module and category names, and dns_log_setcontext() which sets the logging context. Call isc_log_setcontext(), dns_log_init(), and dns_log_setcontext(). 2000-05-03 21:11:40 +00:00
Andreas Gustafsson
deb7afc49f documented the 'covers' argument of dns_ncache_add() 2000-05-03 21:08:14 +00:00
James Brister
e2cf9c2db3 support 'disabled' statement in zone config (causes
zone to be parsed and then ignored). Currently must
come after the 'type' clause.

support optional ports in masters and also-notify
statements:

	masters [ port xxx ] { y.y.y.y [ port zzz ] ; }

removed some unused arguments.

stop issuing some warnings about some features that
were not implemented, but now are.
2000-05-03 19:29:43 +00:00
David Lawrence
09f22ac5b0 Redundant header work, mostly removing <dns/result.h> from installed
headers and adding it to source files that need it.
2000-05-02 03:54:17 +00:00
David Lawrence
b09983678f 145. [cleanup] Added <isc/lang.h> and ISC_LANG_BEGINDECLS/
ISC_LANG_ENDDECLS to header files that had function
                        prototypes, and removed it from those that did not.
2000-05-01 17:59:10 +00:00
David Lawrence
4be63b1fd8 144. [cleanup] libdns header files too numerous to name were made
to conform to the same style for multiple inclusion
                        protection.
2000-04-29 02:02:38 +00:00
Andreas Gustafsson
014892d86d added dns_rdatatype_isknown() 2000-04-29 01:49:37 +00:00
Michael Graff
20c266cbc9 add dispatcher logging functions 2000-04-29 00:45:26 +00:00
Mark Andrews
efd55ce62e Add mctx comment for tostruct. 2000-04-28 23:18:01 +00:00
Mark Andrews
598b67856b dns_zone_{set,get}masterport() is gone. 2000-04-28 17:18:23 +00:00
Bob Halley
80cff01698 rdata.h 2000-04-28 16:29:58 +00:00
Bob Halley
3ae5393d7e Update contract of dns_name_rdatacompare to return < 0, 0, > 0 instead of
-1, 0, 1.
2000-04-28 16:29:48 +00:00
Mark Andrews
6c7e680943 115. [cleanup] libdns.a changes:
dns_zone_clearnotify() and dns_zone_addnotify()
                        are replaced by dns_zone_setnotifyalso().
                        dns_zone_clearmasters() and dns_zone_addmaster()
                        are replaced by dns_zone_setmasters().
2000-04-28 00:58:42 +00:00
David Lawrence
b3e7753518 108. [cleanup] DNS_SETBIT/DNS_GETBIT/DNS_CLEARBIT moved from
<dns/types.h> to <dns/bit.h> and renamed to
                        DNS_BIT_SET/DNS_BIT_GET/DNS_BIT_CLEAR.
2000-04-27 22:26:50 +00:00
Bob Halley
bcaf544581 add macros 2000-04-27 21:45:46 +00:00
Brian Wellington
9e842bb2d3 Allow dnssec verifications to ignore the validity period. 2000-04-27 18:09:10 +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
048f38385e change contract for value of order 2000-04-26 23:12:57 +00:00
Andreas Gustafsson
ad73ddc323 don't use 'new' as an identifier in installed
header files - it's a reserved word in C++
2000-04-26 01:01:23 +00:00
David Lawrence
8fedfa7b45 79. [cleanup] <dns/callbacks.h> does not need <stdio.h>. 2000-04-25 20:13:54 +00:00
David Lawrence
6d4b6f9d4b added dns_c_ndcctx_getserver, minor style lint 2000-04-24 22:53:41 +00:00
David Lawrence
69d9d317ae Add DNS_RBTFIND_NOOPTIONS to make it clear what the options parameter of
dns_rbt_find* is when no options are passed.

Add DNS_RBTFIND_NOPREDECESSOR to specify that the predecessor
searching code of dns_rbt_findnode should be skipped.

Much comment cleanup w.r.t. DNS_RBTFIND_* options.
2000-04-24 21:18:02 +00:00
Brian Wellington
ec371edc34 Add 'type' as a parameter to dns_validator_create() 2000-04-20 20:43:52 +00:00
Brian Wellington
e9a9ae4fc6 Added dns_trust_ultimate for zone data (can be renamed later if necessary). 2000-04-20 18:47:21 +00:00
Andreas Gustafsson
d1bdeae7bb moved typedef of dns_zone_callbackarg_t from <dns/types.h> to
bin/tests/zone2_test.c; it's obsolete and zone2_test.c is the only
place using it
2000-04-20 17:39:02 +00:00
Michael Graff
5007a32191 use unsigned int for bitfields, not isc_boolean_t 2000-04-19 22:47:24 +00:00
Brian Wellington
767b4086b1 dns_dnssec_verifymessage updates 2000-04-19 20:57:55 +00:00
Bob Halley
dded35f92d noexact support 2000-04-19 18:49:11 +00:00
Bob Halley
0a09237aa0 add noexact matching option 2000-04-19 18:21:24 +00:00
Brian Wellington
2e8e76e547 Added dns_keytable_finddeepestmatch() 2000-04-18 17:47:17 +00:00
Mark Andrews
9e53cbca72 Add UDP refresh queries.
Generate NOTIFY messages.
2000-04-18 11:43:46 +00:00
Mark Andrews
262e8ed36a Add DNS_EVENT_VIEWREQSHUTDOWN 2000-04-18 08:36:20 +00:00
Mark Andrews
1a1a2ad3e8 add dns_resolver_dispatchv4(), dns_resolver_dispatchv6() and
dns_resolver_socketmgr().
2000-04-18 08:30:24 +00:00
Mark Andrews
9b8057fce9 Add dns_adb_attach(). 2000-04-18 08:18:52 +00:00
Andreas Gustafsson
e3628581ae say that sigrdataset may be NULL 2000-04-17 23:13:50 +00:00
Andreas Gustafsson
a7b62db9ca commented validator API 2000-04-17 23:02:52 +00:00
Michael Graff
e44487bfc2 convert sender, arg, action, etc. to ev_sender, ev_arg, ev_action, etc. 2000-04-17 19:22:44 +00:00
Michael Graff
7ec579cd5d Add functions to check that a type is only or is not allowed in a question section 2000-04-14 20:13:49 +00:00
Michael Graff
3bb3b7ac46 implement singleton type checking 2000-04-14 18:36:45 +00:00
Brian Wellington
53c892082e Added dns_nxt_typepresent() 2000-04-13 18:08:07 +00:00
David Lawrence
d3c34e76d6 Stole one bit from node's 'attributes' bitfield for 'is_root' boolean.
Prototyped and documented dns_rbt_deletenode.
2000-04-12 21:27:49 +00:00
David Lawrence
567f3a25bc do not include dns/rbt.h 2000-04-12 21:25:27 +00:00
Andreas Gustafsson
b4b4adc097 added convenience function dns_name_format() for use in formatting
log messages
2000-04-11 19:11:46 +00:00
Andreas Gustafsson
230bc05e7e added DNS_LOGCATEGORY_DNSSEC and DNS_LOGMODULE_VALIDATOR 2000-04-11 18:17:35 +00:00
Andreas Gustafsson
edcb93b49c wired up view options: request-ixfr, provide-ixfr 2000-04-07 22:30:43 +00:00
James Brister
6abdc5c090 Changes necessary to support server statements inside a view statement. 2000-04-07 17:40:43 +00:00
Brian Wellington
b80a8db9f9 Added DNS_EVENT_VALIDATORSTART 2000-04-07 17:15:35 +00:00
James Brister
616ee4a3f7 Changes to support keys inside views. 2000-04-07 13:35:06 +00:00
Michael Graff
6324997211 add attributes (line singleton, exlcusive, meta, etc) to rdata C files, and
build a table of them using gen.c.  This means the names are stored twice,
but that will change in the near future.  This will speed up number to text
conversions for rdatatypes, and I plan on speeding up text->number as
well, soon.
2000-04-07 03:54:52 +00:00
Andreas Gustafsson
a672bfbee4 wired up view options: allow-query, allow-recursion, allow-transfer 2000-04-06 23:59:19 +00:00
Michael Graff
4195904998 s/DNS_R_/ISC_R_/ change for some codes. 2000-04-06 22:03:35 +00:00
Michael Graff
c1a2cfef7f s/DNS_R_/ISC_R_/ change for some codes. Mostly documentation in these files. 2000-04-06 20:59:29 +00:00
Andreas Gustafsson
66e2dd5001 wired up view options: recursion, auth-nxdomain, transfer-format 2000-04-06 20:25:48 +00:00
James Brister
a38ea1c635 Change some accessor names. 2000-04-06 20:13:07 +00:00
David Lawrence
5d4f11b265 The RBT now maintains a parent pointer at each node. 2000-04-06 18:47:07 +00:00
James Brister
3a49917729 Support new optional class on a view declaration. 2000-04-06 10:35:27 +00:00
James Brister
5e3d37f84a Many new view-specific fields. 2000-04-06 09:50:13 +00:00
James Brister
03f18a3c14 Three new options fields: lame-ttl min-roots serial-queries. 2000-04-06 09:49:19 +00:00
Andreas Gustafsson
8c1616072e previous commit was by mistake, backed out 2000-04-05 20:49:29 +00:00
Andreas Gustafsson
76ec142174 added 'matchclients' field 2000-04-05 20:45:36 +00:00
Andreas Gustafsson
afd4b04898 need <dns/aclconf.h>, <dns/confctx.h>, <dns/confzone.h>;
removed obsolete comment
2000-04-05 17:37:34 +00:00
Andreas Gustafsson
024eb50b65 must not include <config.h> in installed headers 2000-04-05 17:36:36 +00:00
Andreas Gustafsson
f79476e131 need <dns/confzone.h> 2000-04-05 17:35:56 +00:00
Andreas Gustafsson
8293999117 HEADERS contained obsolete header confserv.h and was missing
peer.h
2000-04-05 17:30:02 +00:00
James Brister
300115d413 Replaced with peer.c and peer.h 2000-04-05 17:20:45 +00:00
James Brister
14256bd72e Removed include of config.h (illegal and unnecessary). 2000-04-05 16:38:01 +00:00
James Brister
ebafb8a02a match-clients support 2000-04-05 15:29:53 +00:00
James Brister
64da53037f Added misc 'unset' functions 2000-04-05 15:22:51 +00:00