2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-05 09:05:40 +00:00
Commit Graph

2460 Commits

Author SHA1 Message Date
Andreas Gustafsson
f1f2f8bd47 Wired up the new 'port' option. Also, the interface manager now has
both a 'listen-on' and a 'listen-on-v6' ACL.  We are still waiting for
the 'listen-on-v6' config file option to set the latter explicitly,
but at least the default value now tracks the 'port' option and the
'-p' command line option.
2000-06-05 19:10:13 +00:00
James Brister
029f5aa861 Conversion of various config file values to isc_uint32_t. 2000-06-05 09:17:14 +00:00
James Brister
69b691c962 Support new 'port' clause in config file options section. Causes
'listen-on', 'masters' and 'also-notify' statements to use its value
instead of default (53).
2000-06-04 19:51:22 +00:00
Brian Wellington
4fe8755480 Use the new DST API 2000-06-02 18:59:33 +00:00
Andreas Gustafsson
11d0a4a55e wired up the sig-validity-interval option; renamed its
access functions in the config code to be consistent with the option name
2000-06-02 17:31:43 +00:00
James Brister
98c2f9a111 Support config file trusted-keys and also-notify statemenets in views.
Support config file sig-validity-interval statement in options, views
and zone statements (master zones only).

Logging messages in config module stripped of trailing period.
2000-06-02 15:12:36 +00:00
David Lawrence
1c70c5ee90 227. [cleanup] The enumerated identifiers dns_rdataclass_*,
dns_rcode_*, dns_opcode_*, and dns_trust_* are
                        also now cast to their appropriate types.
2000-06-02 01:07:05 +00:00
Andreas Gustafsson
a3c0a79b61 dns_name_totext() now always prints the root name as '.',
even when omit_final_dot is true
2000-06-02 00:14:02 +00:00
David Lawrence
0b056755b2 225. [cleanup] The enumerated dns_rdatatype_* identifiers are now
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.)
2000-06-01 21:42:42 +00:00
David Lawrence
6d12fdf966 Megacommit of many files.
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.
2000-06-01 18:26:56 +00:00
Andreas Gustafsson
4831695ebe no need to include <isc/netaddr.h> to get in_port_t; <isc/net.h> suffices 2000-06-01 16:40:23 +00:00
Brian Wellington
2321de58e5 Added #include <isc/netaddr.h>, since in_port_t wasn't defined. 2000-06-01 02:04:01 +00:00
Brian Wellington
7a97b7630f dns_message_gettsig/getsig0 cleanup 2000-06-01 01:30:55 +00:00
Michael Graff
d98c74e2ec set the default destination port in the view, and use it when returning addresses from the adb. 2000-06-01 00:30:58 +00:00
Brian Wellington
fe0e3c7707 Rename message->tsigset/querytsigset to tsig/querytsig. 2000-05-31 23:58:35 +00:00
Andreas Gustafsson
e6ec99f169 commented 2000-05-31 23:35:09 +00:00
James Brister
725a4773f5 Support also-notify and trusted-keys in a view statement.
Fixed error message when lexer couldn't open an input file.
2000-05-31 13:10:00 +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
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
82a30bf0a0 in dns_name_fromtext, REQUIRE() that the source buffer not have an
isc_buffer_remaininglength of 0.  this finds problems like isc_buffer_init
not followed by isc_buffer_add much sooner.

also, enforce the already documented contract requirements of needing
a valid source buffer and either a valid target buffer or a name
with a dedicated buffer.
2000-05-25 23:57:25 +00:00
Andreas Gustafsson
c885fad9b8 Wired up the view-specific 'key' statement. 2000-05-25 22:06:51 +00:00
Andreas Gustafsson
c6cdf39bb2 Removed the function dns_zone_validate(). It was unused,
undocumented, marked XXX, and buggy (it contained a switch
statement that compared an rdclass to a set of zone types).
2000-05-25 21:13:39 +00:00
Andreas Gustafsson
e6aae9483e removed code for hint, forward, and cache "zones" as those
no longer have zone objects associated with them
2000-05-25 21:07:43 +00:00
Andreas Gustafsson
c90b021ea3 renamed dns_zone_setnotifyalso() to dns_zone_setalsonotify(),
to be consistent with the name of the config file option
2000-05-25 15:34:26 +00:00
Brian Wellington
5d83b561ad Added dns_tsigrcode_totext/fromtext 2000-05-25 00:46:32 +00:00
Michael Sawyer
c7868e2262 Modify dns_message_totext, dns_message_sectiontotext,
dns_message_pseudosectiontotext to use bitfields instead of flags
2000-05-24 18:17:53 +00:00
Brian Wellington
19d1b1667d notify and zone soa queries are now tsig signed when appropriate. 2000-05-24 17:30:41 +00:00
David Lawrence
ed019cabc1 fixed lines > 79 columns wide 2000-05-24 05:10:00 +00:00
David Lawrence
94bd549175 updated comments with regards to chains and parent pointers, and added caveat
about what happens with "name" and "origin" parameters when a chain
points to ".".
2000-05-24 02:56:26 +00:00
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