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

238 Commits

Author SHA1 Message Date
Andreas Gustafsson
c7298a2f0e dns_name_totext() now always prints the root name as '.',
even when omit_final_dot is true
2000-06-02 00:19:37 +00:00
Andreas Gustafsson
658dc22047 no need to check for a port number of zero in master addresses as
the configuration code now guarantees that the port numbers have been
set in the masters list
2000-06-01 23:17:46 +00:00
Andreas Gustafsson
a892ddd1bd changed the zone type of the version.bind. CH zone from 'none'
to 'master', as the semantics of zones of type 'none' are not well defined.
Allow zone->dbname to be NULL to support this usage.
2000-06-01 23:11:26 +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
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
Andreas Gustafsson
5416faa397 Fixed RT #127. After the changes of zone.c 1.120, the variable
'soa' was no longer used, but it was still freed (sometimes)
2000-05-31 21:13:57 +00:00
Brian Wellington
090601a51c include dns/rdatastruct.h 2000-05-30 22:30:13 +00:00
Mark Andrews
48841a4ae9 When checking for notifies in the queue first check to see if a request has
been sent.

Check DNS_ZONE_F_NEEDREFRESH when we have got to the last master in
refresh_callback.
2000-05-29 05:47:18 +00:00
Andreas Gustafsson
396dba6250 added /*FALLTHROUGH*/ comments where appropriate 2000-05-26 18:18:12 +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
Andreas Gustafsson
f1248b6383 use isc_sockaddr_any(), isc_sockaddr_any6() 2000-05-25 05:13:19 +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
Andreas Gustafsson
875ad7d99d when reloading the server, zone objects reused with a new
view object still referenced their old view
2000-05-23 04:38:22 +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
Andreas Gustafsson
be8d4578da zone_xferdone() assigned the updated zone expiry time to the wrong variable
zone->expire instead of zone->expiretime.  This left zone->expiretime
with a value of zero, causing zone_settimer() to get horribly confused
and set the timer to the inactive state (!).  This in turn caused
notify-driven refreshes (and probably other timer-scheduled events, too)
to never happen.
2000-05-20 21:24:41 +00:00
Michael Graff
19591ace46 reload zone housekeeping information on AXFR/IXFR 2000-05-20 01:32:46 +00:00
Mark Andrews
a2fad0f37c Convert to use dns_rdata_tostruct(,,mctx = NULL) where appropriate.
Set initial expire based on file mode time.  We can expire when not
running.
2000-05-19 02:18:40 +00:00
Mark Andrews
1aae402fc3 187. [func] isc_ratelimter_enqueue() has an additional arguement
'task'.

 checkpoint zone maintence / notify work.
2000-05-18 04:43:00 +00:00
Mark Andrews
59abb512d3 186 [func] dns_request_getresponse() has an additional arguement
'preserve_order'.
2000-05-18 02:59:20 +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
Andreas Gustafsson
8d6794a163 removed #ifdef'ed-out function dns_zone_manage() 2000-05-14 23:23:37 +00:00
Andreas Gustafsson
bbf6673828 use isc_sockaddr_format() instead of a static function doing
the same thing
2000-05-14 20:52:35 +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
Mark Andrews
902acbaefc notify checkpoint 2000-05-12 10:21:06 +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
65c21f5f73 get rid of a newline in a log message and minor formatting issue (line > 80 chars) 2000-05-11 02:06:18 +00:00
Michael Graff
4cfd0c3960 make magic numbers be the first things in the structures 2000-05-11 00:03:58 +00:00
Mark Andrews
f4f3f2cf34 167. [bug] Make lack of masters for a slave zone a soft error. 2000-05-10 21:51:17 +00:00
Mark Andrews
25d161ae43 Log failures to dump the zone file.
Clear DNS_FLAG_Z_NEEDDUMP after successfully dumping the zone.
2000-05-10 04:47:03 +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
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
Mark Andrews
598b67856b dns_zone_{set,get}masterport() is gone. 2000-04-28 17:18:23 +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
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
Andreas Gustafsson
8db70f36be isc_buffer_putstr() will soon return void 2000-04-26 18:24:15 +00:00
David Lawrence
26037ecb22 Unlock zone->lock when skipping zone load because of database file's age.
Log at ISC_LOG_DEBUG(1) when dns_zone_load is entered, when it skips
loading because the file is older than the last load time, and when it
has successfully loaded the zone.
2000-04-24 23:30:46 +00:00
David Lawrence
1e44dac496 Use renamed functions, isc_mktemplate -> isc_file_mktemplate and
isc_ufile -> isc_file_ufile.

Don't load a zone if the database file for it is older than the last
time the zone was loaded.

Style lint.
2000-04-24 21:59:08 +00:00
Mark Andrews
821c5a2700 Cleanup *before* calling dns_zone_transfer_in(). 2000-04-19 22:21:22 +00:00
Mark Andrews
158ade3c6f Don't notify the master server. 2000-04-19 05:17:12 +00:00
Mark Andrews
8400fbd5c6 Fix locking problem w/ notify.
'next' was sometimes overwritten when it should not have been
causing NEEDNOTIFY to be effectivly ignored.
2000-04-19 02:07:03 +00:00
Andreas Gustafsson
e0a43acbb7 disable notify code until locking bug is fixed 2000-04-18 20:30:47 +00:00
Mark Andrews
9e53cbca72 Add UDP refresh queries.
Generate NOTIFY messages.
2000-04-18 11:43:46 +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
Bob Halley
738b9aa3de isc_task_create() API change 2000-04-12 01:41:21 +00:00
Andreas Gustafsson
edcb93b49c wired up view options: request-ixfr, provide-ixfr 2000-04-07 22:30:43 +00:00
Michael Graff
4195904998 s/DNS_R_/ISC_R_/ change for some codes. 2000-04-06 22:03:35 +00:00
Bob Halley
0218c433f6 dns_zone_notifyreceive() failed to unlock the zone lock in certain
error cases.
2000-04-04 19:21:23 +00:00