2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

839 Commits

Author SHA1 Message Date
David Lawrence
bad71acec3 removed non-existing directory ./include from CINCLUDES 2000-05-24 18:38:43 +00:00
David Lawrence
ed019cabc1 fixed lines > 79 columns wide 2000-05-24 05:10:00 +00:00
David Lawrence
604a596b5f added an UNUSED() to shut up the irix compiler. 2000-05-24 02:39:01 +00:00
David Lawrence
77685300d9 cast isc_time_seconds to long when assigning to a timeval.tv_sec, and explain
why this is an ok thing to do.  shuts up the irix compiler.
2000-05-24 02:36:49 +00:00
David Lawrence
389b5c8593 added a sync_channellist call to isc_log_create to ensure the channellist in
the logconfig is properly dimensioned, and only free the channellist
memory in isc_logconfig_destroy if the channellist_count is > 0.
the first addresses a problem that could occur when a successful
isc_log_create was followed immediately by isc_log_[v]write[1] or
isc_log_destroy (with no intervening isc_log_usechannel or
isc_logconfig_use), and the second addresses a problem that could
occur in cleanup if isc_log_create or isc_logconfig_create failed.
2000-05-24 02:33:16 +00:00
Michael Graff
862d18c79a set ifindex to 0 for outgoing udp ipv6 datagrams. 2000-05-23 02:51:39 +00:00
Michael Graff
5cc49bc70c don't set permanent failure on udp sockets, even on unexpected error 2000-05-23 02:20:23 +00:00
Andreas Gustafsson
b291fec7c9 offset.h was not installed by 'make install' 2000-05-22 22:46:53 +00:00
Andreas Gustafsson
bac6f7fd14 the comments for isc_ratelimiter_create() said the
events are executed in the context of 'task'; this is no longer true
2000-05-22 19:47:43 +00:00
Andreas Gustafsson
34b26adb24 heap invariant INSIST did the wrong thing in the border case
of a heap item and its parent having identical priority
2000-05-22 19:47:01 +00:00
Andreas Gustafsson
b68f341a48 must include <isc/print.h> to use snprintf 2000-05-22 19:29:09 +00:00
Michael Graff
a330a4b008 only set permanent failure for tcp streams on sending 2000-05-22 16:56:12 +00:00
Andreas Gustafsson
e996ff2d5b print isc_time_t fields using %u, not %lu 2000-05-22 03:07:47 +00:00
Andreas Gustafsson
4c94069644 199. [bug] isc_heap_delete() sometimes violated the heap
invariant, causing timer events not to be posted
			when due.

Specifically, isc_heap_delete() moved the last element of the heap to
the vacated position and then attempted to restore the heap invariant
by calling sink_down().  This works when the last element has a lower
priority than the one being deleted, and this is often the case
because the last element tends to have a low priority.  However, it is
not guaranteed to be the lowest.  When deleting an item of a lower
priority than the last item, restoring the invariant requires a call
to float_up(), not sink_down().

isc_heap_delete_now calls either float_up() or sink_down() as needed,
and INSISTs have been added to verify that the heap invariant indeed
holds after the calls.
2000-05-22 02:53:52 +00:00
Michael Graff
24d3d0ecff fix a slight documentation bug 2000-05-20 01:30:16 +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
David Lawrence
e6ce1a0ea9 use _PLATFORM_NEEDINETIN6H 2000-05-18 22:43:48 +00:00
David Lawrence
e8336c458c use HAVE_UNIXWARE_SIGWAIT 2000-05-18 22:39:24 +00:00
David Lawrence
76b4bfdf32 minor assertion check shuffling 2000-05-18 22:38:49 +00:00
Michael Sawyer
232fd751ed Require nanoseconds is valid, instead of t->nanoseconds, which is what we're
getting ready to set.
2000-05-18 18:59:38 +00:00
Brian Wellington
a375150af2 REQUIRE() checking in isc_log_doit could seg fault 2000-05-18 17:56:35 +00:00
David Lawrence
75a44b91a9 isc_time_subtract() now returns isc_result_t.
Use isc_time_secondsastimet() to set a time_t variable.

Properly skip the duplicate checking loop if the boundary time is not
successfully set (this was intended before, but coded wrongly).

Removed unused variable pid_string, after I opted to not add the
unrequested ISC_LOG_PRINTPID option half way into implementing it.
2000-05-18 17:20:15 +00:00
David Lawrence
60e412971e isc_time_add now returns an isc_result_t, ensuring proper range of the
result of the addition.
2000-05-18 17:15:11 +00:00
David Lawrence
87480bb860 Use isc_time_secondsastimet() set timespec.tv_sec (returning an
error if the seconds are out of range), and cast isc_time_nanoseconds()
to shut up the IRIX compiler.
2000-05-18 17:13:58 +00:00
David Lawrence
bc12a0c0d0 Ensure proper range of isc_time_seconds() assigning to timeval.tv_sec,
and cast isc_time_nanoseconds to shut up the IRIX compiler.
2000-05-18 17:12:14 +00:00
David Lawrence
6fa1cb5754 189. [func] isc_time_secondsastimet(), a new function, will ensure
that the number of seconds in an isc_time_t does not
                        exceed the range of a time_t, or return ISC_R_RANGE.
                        Similarly, isc_time_now(), isc_time_nowplusinterval(),
                        isc_time_add() and isc_time_subtract() now check the
                        range for overflow/underflow.  In the case of
                        isc_time_subtract, this changed a calling requirement
                        (ie, something that could generate an assertion)
                        into merely a condition that returns an error result.
                        isc_time_add() and isc_time_subtract() were void-
                        valued before but now return isc_result_t.

The seconds member isc_time_t on Unix platforms was changed from time_t
to unsigned int.

unix/time.c now uses macros for nanoseconds per second, nanoseconds per
microsecond and microseconds per second to make sure that the right
number of zeros appears each place the constant is used.

unix/time.c functions which take initialized isc_(interval|time)_t arguments
INSIST() that the nanoseconds value is less than one full second.

unix/time.c's isc_time_microdiff was broken because it did multiplication and
addition with unsigned integers and attempted to set them a 64 bit int to
avoid overflow, but C's ints don't promote to 64 bits on machines that only
have 32 bit longs.  Fixed.

Added all the pertinent documentation to time.h.
2000-05-18 17:08:32 +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
fc1feadb61 Add ISC_SOCKADDR_FORMATSIZE macro. 2000-05-17 02:20:58 +00:00
Brian Wellington
a823dfa663 sys/time.h needed for struct timeval 2000-05-16 21:05:03 +00:00
David Lawrence
600cfa2ba4 184. [cleanup] Variables/functions which began with two leading
underscores were made to conform to the ANSI/ISO
                        standard, which says that such names are reserved.
2000-05-16 05:19:47 +00:00
David Lawrence
6d8cdbaff4 185. [bug] Fixed up handling of ISC_MEMCLUSTER_LEGACY. Several
public functions did not have an isc__ prefix, and
                        referred to functions that had previously been
                        renamed.

 184.   [cleanup]       Variables/functions which began with two leading
                        underscores were made to conform to the ANSI/ISO

function declaration and comment reformatting in accordance with coding
style document.

check_overrun conditionally compiled based on ISC_MEM_FILL and
ISC_MEM_CHECKOVERRUN to avoid compiler warnings about being defined
but not used if one of those two CPP symbols is not defined.
2000-05-16 05:17:31 +00:00
David Lawrence
a120694df8 conform variable names in isc_.*region_consume to ANSI/ISO standard 2000-05-16 03:37:40 +00:00
David Lawrence
2918b5bda6 ISC_LOG_PRINTTAG/isc_log_settag()/isc_log_gettag() added 2000-05-16 03:37:39 +00:00
David Lawrence
cb4a97bb1c added missing config.h 2000-05-16 03:00:53 +00:00
Mark Andrews
5273184ae1 Add isc_file_settime() set access and modification times. 2000-05-16 02:13:08 +00:00
David Lawrence
c5c3b17a0a added ISC_R_RANGE 2000-05-15 20:37:06 +00:00
Andreas Gustafsson
33e0be00e3 isc_sockaddr_any6() set sockaddr->length incorrectly 2000-05-15 04:47:20 +00:00
David Lawrence
02b152eb28 line 356: remark(1174): parameter "msg" was declared but never referenced
line 356: remark(1174): parameter "dev" was declared but never referenced

This is true when ISC_NET_BSD44MSGHDR is not defined.  UNUSED()s were added.

line 1580: remark(1552): variable "task" was set but never used
line 1670: remark(1552): variable "task" was set but never used

I removed the stack variable and its assignment in each case.

line 2915: remark(1552): variable "ret" was set but never used

It was apparent that the variable was meant to be the return value
of isc_socket_getsockname, so the return statement was changed to use it.

Also ...

Changed function declarations to ISC coding style.

Wrapped two lines that were wider than column 79.

Removed two UNUSED() macros for variables that were no longer unused.
2000-05-14 22:35:45 +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
527ea00c17 174. [func] New public function isc_sockaddr_format(), for
formatting socket addresses in log messages.
2000-05-14 20:42:43 +00:00
David Lawrence
2467f3cafd Removed comment about some day prefixing members of ISC_EVENT_COMMON
with ev_ prefix, since that has been done.
2000-05-14 02:12:18 +00:00
David Lawrence
e52750239e Changed the CPP symbol it uses from *_HAVENETINET6* to *_NEEDNETINET6*
to better clarify what is going on with regard to the symbol.
2000-05-13 18:18:08 +00:00
Michael Graff
3ee8ba5e32 expand on why magic numbers need to be first in the structure 2000-05-11 16:18:01 +00:00
David Lawrence
d8e34837cd isc_file_{stdiofunc} -> isc_stdio_* 2000-05-11 16:14:05 +00:00
David Lawrence
0c73b546ec Moved posix_result from file.c to errno2result.[ch], for use by multiple
source files.  We may want to generalize this as part of the libisc API,
but with a better name.
2000-05-11 15:09:30 +00:00
Mark Andrews
c052487cdf 169. [func] ratelimiter can now process N events per interval. 2000-05-11 09:23:29 +00:00
Michael Graff
2fc337ec38 add isc_socket_isbound() 2000-05-11 07:39:17 +00:00
Michael Graff
6849d91cd7 mark accepted connections as connected and bound. 2000-05-11 06:35:20 +00:00
Michael Graff
8321dd2150 add ISC_R_NOTBOUND and ISC_R_NOTCONNECTED and return them where appropriate. 2000-05-11 05:43:53 +00:00
Michael Graff
f019e00452 Add (commented out) 'must be bound' checking 2000-05-10 21:17:49 +00:00