bind9/CHANGES
David Lawrence e1747e09e7 Vertical whitespace is encouraged for improved code legibility by
grouping closely related statements and then separating them with a
single empty line.

Lines should not be longer than 79 characters, even if it requires
violating the indentation rules to do so.  Since ANSI is assumed, the
best way to deal with strings that extend past column 79 is to break
them into two or more sections separated from each other by a newline
and indentation. (w/example)

Note that <isc/lang.h> should be included by any public
header file to get the ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS
macros used so the correct name-mangling happens for function
declarations when C++ programs include the file. <isc/lang.h> should
be included for private header files or for public files that do not
declare any functions. (w/example)

Fixed < and > use in sample header file.

The config.h file must never be included by any public header file.

The comma operator should not be used to form compound statements.
(w/example)

Generally speaking, when a control statement (<CODE>if, for</CODE> or
<CODE>while</CODE>) has only a single action associated with it, then no
bracing is used around the statement.  Exceptions include when the
compiler would complain about an ambiguous else clause, or when extra
bracing improves the readability (a judgement call biased toward not
having the braces).

Do not put a space after the "sizeof" operator name, and also
parenthesize its argument, as in <CODE>malloc(4 * sizeof(long))</CODE>.

Do not put a space after a cast. (w/example)

<H4>The Ternary Operator</H4> (w/example)
The ?: operator should mostly be avoided.  It is tolerated when
deciding what value to pass as a parameter to a function, such as
frequently happens with printf, and also when a simple (non-compound)
value is being used in assignment or as part of a calculation.
In particular, using the ternary operator to specify a return value is
verboten. (Well, Bob didn't tell me *forbidden* when he first said this
to me long ago, but I got the impression he really did not like it.)

Variables should not have their values assigned or changed when being
passed as parameters, except perhaps for the increment and decrement
operators. (This came up when I found something much like this in one
of our files:
       malloc(size = 20);

All public interfaces to functions, macros, typedefs, and
variables provided by the library, should use names of the form
{library}_{module}_{what}, such as:

       isc_buffer_t                            /* typedef */
       dns_name_setbuffer(name, buffer)       /* function */
       ISC_LIST_HEAD(list)                    /* macro */
       isc_commandline_argument               /* variable */

however, structures which are typedef'd generally have the name of the
typedef sans the final _t:

       struct dns_rbtnode {
               /* ... members ... */
       }

Generally speaking macros are defined with all capital letters, but
this is not universally consistent (eg, numerous isc_buffer_{foo}
macros).

The {module} and {what} segments of the name do not have underscores
separating natural word elements, as demonstrated in
isc_commandline_argument and dns_name_setbuffer above.  The {module}
part is usually the same as the basename of the source file, but
sometimes other {module} interfaces appear within one file, such as
dns_label_* interfaces in lib/dns/name.c.  However, in the public
libraries the file name must be the same as some module interface
provided by the file; e.g., dns_rbt_* interfaces would not be declared
in a file named redblack.c (in lieu of any other dns_redblack_*
interfaces in the file).

The one notable exception to this naming rule is the interfaces
provided by <isc/util.h>.  There's a large caveat associated with the
public description of this file that it is hazardous to use because it
pollutes the general namespace.

<H4>Shared Private Interfaces</H4>
When a module provides an interface for internal use by other modules
in the library, it should use the same naming convention
described for the public interfaces, except {library} and {module}
are separated by a double-underscore.  This indicates that the name is
internal, its API is not as formal as the public API, and thus it
might change without any sort of notice.
2000-04-27 02:00:44 +00:00

365 lines
14 KiB
Text

105. [doc] doc/dev/coding.html expanded with other
implicit conventions the developers have used.
104. [bug] Made compress_add and compress_find static to
lib/dns/compress.c.
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.
102. [port] Correctly detect inet_aton, inet_pton and inet_ptop
on BSD/OS 4.1.
101. [cleanup] Quieted EGCS warnings from lib/isc/print.c.
100. [cleanup] <isc/random.h> does not need <isc/int.h> or
<isc/mutex.h>. isc_random_t moved to <isc/types.h>.
99. [cleanup] Rate limiter now has separate shutdown() and
destroy() functions, and it guarantees that all
queued events are delivered even in the shutdown case.
98. [cleanup] <isc/print.h> does not need <stdarg.h> or <stddef.h>
unless ISC_PLATFORM_NEEDVSNPRINTF is defined.
97. [cleanup] <isc/ondestroy.h> does not need <stddef.h> or
<isc/event.h>.
96. [cleanup] <isc/mutex.h> does not need <isc/lang.h> or
<isc/result.h>.
95. [cleanup] <isc/mutexblock.h> does not need <isc/result.h>.
94. [cleanup] Some installed header files did not compile as C++.
93. [cleanup] <isc/msgcat.h> does not need <isc/result.h>.
92. [cleanup] <isc/mem.h> does not need <stddef.h>, <isc/boolean.h>,
or <isc/result.h>.
91. [cleanup] <isc/log.h> does not need <sys/types.h> or
<isc/result.h>.
90. [cleanup] Removed unneeded ISC_LANG_BEGINDECLS/ISC_LANG_ENDDECLS
from <named/listenlist.h>.
89. [cleanup] <isc/lex.h> does not need <stddef.h>.
88. [cleanup] <isc/interfaceiter.h> does not need <isc/result.h> or
<isc/mem.h>. isc_interface_t and isc_interfaceiter_t
moved to <isc/types.h>.
87. [cleanup] <isc/heap.h> does not need <isc/boolean.h>,
<isc/mem.h> or <isc/result.h>.
86. [cleanup] isc_bufferlist_t moved from <isc/bufferlist.h> to
<isc/types.h>.
85. [cleanup] <isc/bufferlist.h> does not need <isc/buffer.h>,
<isc/list.h>, <isc/mem.h>, <isc/region.h> or
<isc/int.h>.
84. [func] allow-query ACL checks now apply to all data
added to a response.
83. [func] If the server is authoritative for both a
delegating zone and its (nonsecure) delegatee, and
a query is made for a KEY RR at the top of the
delegatee, then the server will look for a KEY
in the delegator if it is not found in the delegatee.
82. [cleanup] <isc/buffer.h> does not need <isc/list.h>.
81. [cleanup] <isc/int.h> and <isc/boolean.h> do not need
<isc/lang.h>.
80. [cleanup] <isc/print.h> does not need <stdio.h> or <stdlib.h>.
79. [cleanup] <dns/callbacks.h> does not need <stdio.h>.
78. [cleanup] lwres_conftest renamed to lwresconf_test for
consistency with other *_test programs.
77. [cleanup] typedef of isc_time_t and isc_interval_t moved from
<isc/time.h> to <isc/types.h>.
76. [cleanup] Rewrote keygen.
75. [func] Don't load a zone if its database file is older
than the last time the zone was loaded.
74. [cleanup] Removed mktemplate.o and ufile.o from libisc.a,
subsumed by file.o.
73. [func] New "file" API in libisc, including new function
isc_file_getmodtime, isc_mktemplate renamed to
isc_file_mktemplate and isc_ufile renamed to
isc_file_openunique. By no means an exhaustive API,
it is just what's needed for now.
72. [func] DNS_RBTFIND_NOPREDECESSOR and DNS_RBTFIND_NOOPTIONS
added for dns_rbt_findnode, the former to disable the
setting of the chain to the predecessor, and the
latter to make clear when no options are set.
71. [cleanup] Made explicit the implicit REQUIREs of
isc_time_seconds, isc_time_nanoseconds, and
isc_time_subtract.
70. [func] isc_time_set() added.
69. [bug] The zone object's master and also-notify lists grew
longer with each server reload.
68. [func] Partial support for SIG(0) on incoming messages.
67. [performance] Allow use of alternate (compile-time supplied)
OpenSSL libraries/headers.
66. [func] Data in authoritative zones should have a trust level
beyond secure.
65. [cleanup] Removed obsolete typedef of dns_zone_callbackarg_t
from <dns/types.h>.
64. [func] The RBT, DB, and zone table APIs now allow the
caller find the most-enclosing superdomain of
a name.
63 [func] Generate NOTIFY messages.
62. [func] Add UDP refresh support.
61. [cleanup] Use single quotes consistently in log messages.
60. [func] Catch and disallow singleton types on message
parse.
59. [bug] Cause net/host unreachable to be a hard error
when sending and receiving.
58. [bug] bin/named/query.c could sometimes trigger the
(client->query.attributes & NS_QUERYATTR_NAMEBUFUSED)
== 0 assertion in query_newname().
57. [func] Added dns_nxt_typepresent()
56. [bug] SIG records were not properly returned in cached
negative answers.
55. [bug] Responses containing multiple names in the authority
section were not negatively cached.
54. [bug] 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.
53. [port] freebsd 4.0: lib/isc/unix/socket.c requires
<sys/param.h>.
52. [bug] rndc: taskmgr and socketmgr were not initaliased
to NULL.
51. [cleanup] dns/compress.h and dns/zt.h did not need to include
dns/rbt.h; it was needed only by compress.c and zt.c.
50. [func] RBT deletion no longer requires a valid chain to work,
and dns_rbt_deletenode was added.
49. [func] Each cache now has its own mctx.
48. [func] isc_task_create() no longer takes an mctx.
isc_task_mem() has been eliminated.
47. [func] A number of modules now use memory context reference
counting.
46. [func] Memory contexts are now reference counted.
Added isc_mem_inuse() and isc_mem_preallocate().
Renamed isc_mem_destroy_check() to
isc_mem_setdestroycheck().
45. [bug] The trusted-key statement incorrectly loaded keys.
44. [bug] Don't include authority data if it would force us
to unset the AD bit in the message.
43. [bug] DNSSEC verification of cached rdatasets was failing.
42. [cleanup] Simplified logging of messages with embedded domain
names by introducing a new convenience function
dns_name_format().
41. [func] Use PR_SET_KEEPCAPS on Linux 2.3.99-pre3 and later
to allow 'named' to run as a non-root user while
retaining the ability to bind() to privileged
ports.
40. [func] Introduced new logging category "dnssec" and
logging module "dns/validator".
39. [cleanup] Moved the typedefs for isc_region_t, isc_textregion_t,
and isc_lex_t to <isc/types.h>.
38. [bug] TSIG signed incoming zone transfers work now.
37. [bug] If the first RR in an incoming zone transfer was
not an SOA, the server died with an assertion failure
instead of just reporting an error.
36. [cleanup] Change DNS_R_SUCCESS (and others) to ISC_R_SUCCESS
35. [performance] Log messages which are of a level too high to be
logged by any channel in the logging configuration
will not cause the log mutex to be locked.
34. [bug] Recursion was allowed even with 'recursion no'.
33. [func] The RBT now maintains a parent pointer at each node.
32. [cleanup] bin/lwresd/client.c needs <string.h> for memset()
prototype.
31. [bug] Use ${LIBTOOL} to compile bin/named/main.@O@.
30. [func] config file grammer change to support optional
class type for a view.
29. [func] support new config file view options:
auth-nxdomain recursion query-source
query-source-v6 transfer-source
transfer-source-v6 max-transfer-time-out
max-transfer-idle-out transfer-format
request-ixfr privide-ixfr cleaning-interval
fetch-glue notify rfc2308-type1 lame-ttl
max-ncache-ttl min-roots
28. [func] support lame-ttl, min-roots and serial-queries
config global options.
27. [bug] Only include <netinet6/in6.h> on BSD/OS 4.[01]*.
Including it on other platforms (eg, NetBSD) can
cause a forced #error from the C preprocessor.
26. [func] new match-clients statement in config file view.
25. [bug] make install failed to install <isc/log.h> and
<isc/ondestroy.h>.
24. [cleanup] Eliminate some unnecessary #includes of header
files from header files.
23. [cleanup] Provide more context in log messages about client
requests, using a new function ns_client_log().
22. [bug] SIGs weren't returned in the answer section when
the query resulted in a fetch.
21. [port] Look at STD_CINCLUDES after CINCLUDES during
compilation, so additional system include directories
can be searched but header files in the bind9 source
tree with conflicting names take precedence. This
avoids issues with installed versions of dnssafe and
openssl.
20. [func] Configuration file post-load validation of zones
failed if there were no zones.
19. [bug] dns_zone_notifyreceive() failed to unlock the zone
lock in certain error cases.
18. [bug] Use AC_TRY_LINK rather than AC_TRY_COMPILE in
configure.in to check for presence of in6addr_any.
17. [func] Do configuration file post-load validation of zones.
16. [bug] put quotes around key names on config file
output to avoid possible keyword clashes.
15. [func] Add dns_name_dupwithoffsets(). This function is
improves comparison performance for duped names.
14. [bug] free_rbtdb() could have 'put' unallocated memory in
an unlikely error path.
13. [bug] lib/dns/master.c and lib/dns/xfrin.c didn't ignore
out-of-zone data.
12. [bug] Fixed possible unitialized variable error.
11. [bug] axfr_rrstream_first() didn't check the result code of
db_rr_iterator_first(), possibly causing an assertion
to be triggered later.
10. [bug] A bug in the code which makes EDNS0 OPT records in
bin/named/client.c and lib/dns/resolver.c could
trigger an assertion.
9. [cleanup] replaced bit-setting code in confctx.c and replaced
repeated code with macro calls.
8. [bug] Shutdown of incoming zone transfer accessed
freed memory.
7. [cleanup] removed 'listen-on' from view statement.
6. [bug] quote RR names when generating config file to
prevent possible clash with config file keywords
(such as 'key').
5. [func] syntax change to named.conf file: new ssu grant/deny
statements must now be enclosed by an 'update-policy'
block.
4. [port] bin/named/unix/os.c didn't compile on systems with
linux 2.3 kernel includes due to conflicts between
C library includes and the kernel includes. We now
get only what we need from <linux/capability.h>, and
avoid pulling in other linux kernel .h files.
3. [bug] TKEYs go in the answer section of responses, not
the additional section.
2. [bug] Generating cryptographic randomness failed on
systems without /dev/random.
1. [bug] The installdirs rule in
lib/isc/unix/include/isc/Makefile.in had a typo which
prevented the isc directory from being created if it
didn't exist.
--- 9.0.0b2 released ---