Commit graph

231 commits

Author SHA1 Message Date
Andreas Gustafsson
f915bbfc2d rdatas constructured by query_addcnamelike() always had
type CNAME, even when part of a non-CNAME rdataset
2001-02-14 19:32:30 +00:00
Andreas Gustafsson
65a66336a6 redid configuration locking using isc_task_beginexclusive()
and isc_task_endexclusive() instead of a multitude of separate
configuration rwlocks
2001-02-14 03:54:53 +00:00
Brian Wellington
dc5415c9fd comment update 2001-02-14 03:01:12 +00:00
Brian Wellington
3d76b54512 Don't create a timer for every incoming query - only create it for updates,
notifies, and recursive queries.
2001-01-29 19:49:52 +00:00
Andreas Gustafsson
75534b6392 optimization: when deciding whether to do v6 syntheis, check the query type
before the ACL because it's usually faster that way
2001-01-26 23:40:44 +00:00
Brian Wellington
d29da750d2 statistics counting was slowing down the server. Make client.c:count_query()
inline and remove dns_stats_ncounters(), which just returned the public
constant DNS_STATS_NCOUNTERS.
2001-01-23 01:50:29 +00:00
Andreas Gustafsson
634784cb66 701. [func] Root hints are now fully optional. Class IN
views use compiled-in hints by default, as
                        before.  Non-IN views with no root hints now
                        provide authoritative service but not recursion.
                        A warning is logged if a view has neither root
                        hints nor authoritative data for the root. [RT #696]
2001-01-22 19:21:19 +00:00
Andreas Gustafsson
7946047f2d name data are unsigned char, not char 2001-01-11 20:48:27 +00:00
Andreas Gustafsson
fd8125cac3 respond with NXDOMAIN, not SERVFAIL, when no PTR record is
found in either ip6.int or ip6.arpa
2001-01-09 23:48:44 +00:00
Andreas Gustafsson
14b90c6eb0 v6 synthesis code used uninitialized variable 2001-01-09 22:10:32 +00:00
Brian Wellington
499b34cea0 copyright update 2001-01-09 22:01:04 +00:00
Andreas Gustafsson
576f85e5fd 673. [func] The server can now convert RFC1886-style recursive
lookup requests into RFC2874-style lookups, when
                        enabled using the new option "allow-v6-synthesis".
2001-01-09 18:26:01 +00:00
Andreas Gustafsson
ad26c86891 checkpoint: IPv6 response synthesis implemented for the reverse
mapping case but still disabled due to lack of configurability
2001-01-09 06:48:47 +00:00
Andreas Gustafsson
4e13b2c33c deal with CNAME loops in AAAA synthesis 2001-01-07 23:36:56 +00:00
Andreas Gustafsson
501f6a2fa5 checkpoint: IPv6 response synthesis implemented for the forward
mapping case but still disabled due to lack of configurability
2001-01-07 22:18:00 +00:00
Andreas Gustafsson
b23f160d5b simplified handling of the query type, removing the final
vestiges of support for multiple queries per packet, in preparation
for AAAA synthesis code which needs to know the query type earlier
than it was previously available
2001-01-07 22:06:14 +00:00
Brian Wellington
ec772e873b 651. [func] The AD bit in responses now has the meaning
specified in <draft-ietf-dnsext-ad-is-secure>.
2001-01-04 00:24:26 +00:00
Brian Wellington
6d5032f9a2 Micro-optimizations:
- use the DNS_NAME_INIT macro in name.c
	- create dns_name_copy() and use it instead of dns_name_concatenate()
	  when doing a copy.
2001-01-03 00:05:15 +00:00
Mark Andrews
af5dc286ff 640. [bug] Memory leak in error path could cause
"mpctx->allocated == 0" failure. [RT #584]
2000-12-27 23:01:25 +00:00
Brian Wellington
c8fc692fa1 618. [bug] Queries to a signed zone could sometimes cause
an assertion failure.
2000-12-16 02:30:58 +00:00
Brian Wellington
78838d3e0c 8 space -> tab conversion 2000-12-11 19:24:30 +00:00
Mark Andrews
6fda157766 ISC_LINK_*UNSAFE -> ISC_LINK_INITAND* 2000-12-07 20:15:58 +00:00
Andreas Gustafsson
985013e619 don't increment the referral counter when using the root hints (RT #527) 2000-12-05 19:17:32 +00:00
Andreas Gustafsson
90ad126bb3 more DNS_OPT_NEWCODES sanitation 2000-12-02 04:44:51 +00:00
Andreas Gustafsson
ce1f5b8d0a rewrote much of the statistics counter code 2000-12-01 23:49:59 +00:00
Andreas Gustafsson
d3be9a9c6e 583. [func] "rndc querylog" will now toggle logging of
queries, like "ndc querylog" in BIND 8.
2000-11-30 00:25:49 +00:00
Andreas Gustafsson
86a4d80e06 565. [func] Log queries more like BIND 8: query logging is now
done to category queries, level info. [RT #169]
2000-11-23 01:32:48 +00:00
Andreas Gustafsson
ab13b279ae revert the change of 1.151->1.152 - it is more important to log
queries sanely than to log them the same way BIND 8 did
2000-11-23 01:18:34 +00:00
Bob Halley
6b5a6fbe1c only set AD if they asked for DNSSEC 2000-11-20 17:53:35 +00:00
David Lawrence
7fd17f3f4d 565. [func] Log queries more like BIND 8. Query logging is done
to category "general", module "query", debug level 1.
			[RT #169]
2000-11-16 19:20:08 +00:00
Andreas Gustafsson
e9f6414d40 simplified query logging code by dropping support for EDNS1
multiple queries and by using dns_rdata{type,class}_format();
include the class in query log messages
2000-11-15 19:35:07 +00:00
Andreas Gustafsson
eb23b7b590 eliminated compiler warnings;
renamed setup_sortlist() to ns_sortlist_setup() to conform
to naming conventions
2000-11-15 18:12:38 +00:00
Andreas Gustafsson
50faa6daf7 refactored sortlist code to make it possible to sort addresses
that are not part of an rdata, as required by lwresd
2000-11-14 03:30:53 +00:00
Brian Wellington
78d78f05d9 556. [func] The DNSSEC OK bit in the EDNS extended flags
is now implemented.  Responses to queries without
                        this bit set will not contain any DNSSEC records.
2000-11-13 21:34:03 +00:00
Brian Wellington
0042d68e2f #include <string.h> 2000-11-13 20:10:19 +00:00
Andreas Gustafsson
1442a167f5 minor fixes to sortlist comments and spacing 2000-11-11 00:34:20 +00:00
Andreas Gustafsson
917c8406f6 handle negated sortlist entries correctly 2000-11-11 00:26:52 +00:00
Andreas Gustafsson
febaa09184 551. [func] Implemented the 'sortlist' option. 2000-11-10 03:16:26 +00:00
Michael Sawyer
31eef7e2d4 Use lowercase names for stats
statistic printing code cleanup
move some of the statistics stufdf to the server object
2000-11-09 19:55:20 +00:00
Michael Sawyer
a3a11c4f3f Add the ability (via rndc dump-statistics) to dump a file with counters of
various results given to queries.  Enable the (previously disabled)
statistics-file config option.
2000-11-07 23:49:42 +00:00
Mark Andrews
368b37b616 dns_rdata_invalidate -> dns_rdata_reset 2000-10-31 03:22:05 +00:00
Mark Andrews
c03bb27f06 532. [func] Implement DNS UPDATE pseudo records using
DNS_RDATA_UPDATE flag.

 531.   [func]          Rdata really should be initalized before being
                        assigned to (dns_rdata_fromwire(), dns_rdata_fromtext(),
                        dns_rdata_clone(), dns_rdata_fromregion()),
                        check that it is.
2000-10-25 04:26:57 +00:00
Mark Andrews
5e589b5356 Uninitalised link fixes, batch 1. 2000-10-20 02:21:58 +00:00
Michael Sawyer
55aed608cc Add counters of incoming queries, server-wide and by zone. There is
currently no way to get these counts back *out* of the server, pending
a command channel.  A temporary channel should be built for these data
soon.
2000-10-17 20:57:26 +00:00
Michael Sawyer
94b50bce2b Add zone-specific reload and refresh capability to server and rndc 2000-10-12 21:52:00 +00:00
Michael Sawyer
f6b2acd608 Minor change to make GNS changes easier, as well as a minor typo. 2000-10-11 18:00:08 +00:00
Michael Sawyer
dc570b92f6 Add support for proposed ZONE and VIEW opt attributes. These are currently
hidden behind #ifdef's, since no OPT code number has yet to be assigned
by the IANA.  They are also not quite complete in all regards; VIEW
options are understood and ignored.  ZONE options are understood and
acted upon, though some of the error cases aren't quite right.

Remove doubled isc_mem_stats in dighost.c

Update todo list.

Change literal 255's to DNS_NAME_MAXWIRE in name.c
2000-10-11 17:44:18 +00:00
Brian Wellington
d1cbf71409 clean up suspicious looking and incorrect uses of dns_name_fromregion 2000-10-07 00:09:28 +00:00
Mark Andrews
88cef4408a 493. [func] Return non-cachable (ttl = 0) NXDOMAIN responses
for SOA queries.  This makes it easier to locate
                        the containing zone without polluting intermediate
                        caches.
2000-09-28 05:48:50 +00:00
Andreas Gustafsson
337ca18384 475. [bug] query_getzonedb() sometimes returned a non-null version
on failure.  This caused assertion failures when
                        generating query responses where names subject to
                        additional section processing pointed to a zone
                        to which access had been denied by means of the
                        allow-query option. [RT #336]
2000-09-19 22:30:39 +00:00
Andreas Gustafsson
3a1ad1b045 removed #if 0'ed-out code 2000-09-13 17:49:00 +00:00
Michael Graff
b95c1391fa log query denied at INFO level, rather than error 2000-09-12 19:27:10 +00:00
Michael Graff
42e31e6ef7 pass in the log level desired; make 'client denied recursion' log at debug level 1 always. 2000-09-12 18:50:36 +00:00
Andreas Gustafsson
1fc26319b5 423. [bug] When responding to a recusive query, errors that occur
after following a CNAME should cause the query to fail.
                        [RT #274]
2000-09-06 18:41:22 +00:00
Michael Graff
1865d559b0 Fix the database error, I think... Need to look at this better. 2000-08-26 23:22:36 +00:00
Brian Wellington
2c1a16dc25 Remove multiple question support, since edns1 is dead. 2000-08-21 23:45:41 +00:00
Andreas Gustafsson
e605e98f3e use DNS_NAME_MAXTEXT/DNS_NAME_FORMATSIZE 2000-08-09 00:09:36 +00:00
Andreas Gustafsson
ff56121a98 use isc_log_wouldlog() 2000-08-08 23:57:13 +00:00
Andreas Gustafsson
40b1b44ed6 377. [bug] WHen additional data lookups were refused due to
allow-query, the databases were still being
                        attached causing reference leaks.
2000-08-08 19:16:19 +00:00
Andreas Gustafsson
575db903aa 375. [bug] Per-zone allow-query did not properly override the
view/global one for CNAME targets and additional
                        data [RT #220].
2000-08-08 17:14:33 +00:00
Andreas Gustafsson
2ebe19d1a2 SOA in authoritative negative responses had wrong TTL (RT #212) 2000-08-08 00:46:00 +00:00
David Lawrence
40f53fa8d9 Trailing whitespace trimmed. Perhaps running "perl util/spacewhack.pl in your
own CVS tree will help minimize CVS conflicts.  Maybe not.
Blame Graff for getting me to trim all trailing whitespace.
2000-08-01 01:33:37 +00:00
Michael Graff
6d3496c045 Implement additional-from-{glue,auth} [ yes | no ] ;
with yes being the default.  These control searching in the cache and
other zones we are authorative for.  This is mostly for gdib, but
may be useful elsewhere.

The config changes are renaming from glue-from-* to additional-from-*,
since this also prevents DNAME, CNAME, NS, MX, etc. additional data
from being followed.
2000-07-31 21:07:07 +00:00
David Lawrence
15a4474541 word wrap copyright notice at column 70 2000-07-27 09:55:03 +00:00
Brian Wellington
1702f1a0fe Add a 'fetchoptions' field to the query structure, which is currently 0
unless the query has the cd bit set.
2000-07-25 21:37:05 +00:00
Brian Wellington
5d9e3392b2 Add support for the cd (checking disabled) bit. Setting the cd bit in a
query still doesn't completely work, since the resolver needs to be modified
also.  Basically, if data is in the cache and trust == pending, it will now
be returned when the cd bit is set.
2000-07-25 01:06:18 +00:00
Brian Wellington
70c2802fd7 In query_addbestns, check that both the rdataset and sigrdataset are not
pending before adding them.
2000-07-18 22:24:45 +00:00
Andreas Gustafsson
04d58db327 321. [bug] When synthesizing a CNAME RR for a DNAME
response, query_addcname() failed to intitialize
                        the type and class of the CNAME dns_rdata_t,
                        causing random failures.
2000-07-10 18:33:25 +00:00
Brian Wellington
baeb4bcf32 In query_find(), if we're looking up a key and dns_db_find() returns
DNS_R_DELEGATION, don't use the domain & ns set found by dns_db_find().
This means that a recursive server will not immediately ask the child zone
for a key set at the apex; the resolver will determine who to ask.
2000-07-06 02:27:26 +00:00
Andreas Gustafsson
4defd73fca This is "the glue fix". It changes the additional data lookup
algorithm to more closely follow RFC1035, so that root servers will
provide a more complete set of name server glue addresses in ccTLD
referral responses.

For non-referral responses, the server no longer uses glue as
additional data.

For referral responses, the servers now looks for glue A/AAAA/A6 RRs
in the zone where the NS RRs reside, even in the case where this is
different from the zone where the A/AAAA/A6 RRs would have resided had
they been authoritative data.

A6 chains included as additional info may not yet fully follow these
rules.
2000-07-05 23:10:06 +00:00
Andreas Gustafsson
a074e41b97 style and new comments; no functional change 2000-07-04 01:33:47 +00:00
Michael Graff
4ecbc9c96f Don't use TCP for outgoing queries just because the client is TCP. 2000-06-26 21:42:33 +00:00
David Lawrence
9c3531d72a add RCS id string 2000-06-22 22:00:42 +00:00
Mark Andrews
0bfcec250f 254. [bug] suppress "query denied" messages on additional data
lookups.
 ISC-Bugs #139
2000-06-15 04:42:01 +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
7efc8c3f69 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.

Minor other ISC style cleanups.
2000-06-01 18:49:22 +00:00
David Lawrence
ed019cabc1 fixed lines > 79 columns wide 2000-05-24 05:10:00 +00:00
David Lawrence
ffead635aa removed unused stack variable "set_ra" from ns_query_start.
wrapped long lines.
fixed comment to ISC style.
2000-05-24 03:23:42 +00:00
Andreas Gustafsson
949162ca40 in [84], after allowing access to a zone based on the view
allow-query ACL, subsequent accesses to the same zone were denied because
dbversion->queryok was not being set.  This caused mandatory glue to be
omitted from referral responses, ultimately causing lookups to fail if all
authoritative servers for the parent zone were running bind9.
2000-05-11 20:10:34 +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
David Lawrence
b77f76be2d Where the methods field of an rdataset was compared to NULL, now use
dns_rdataset_isassociated() instead.
2000-04-28 23:46:43 +00:00
Andreas Gustafsson
82ca33427b declare arguments as UNUSED() when used in assertions only 2000-04-28 01:24:18 +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
924e26ea2f Look for KEY RRs in both the delegator and delegatee if we're
authoritative for both, the delegatee is nonsecure, and the query
name is at the top of the delegatee zone.

Apply allow-query ACL checks to all response data.
2000-04-25 21:58:17 +00:00
Bob Halley
e2fe0815b3 conform to zt API change 2000-04-19 18:27:42 +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
15a0ed3060 fix [RT 94] (name buffer already in use assertion) 2000-04-13 19:34:02 +00:00
Andreas Gustafsson
ad2c5d060d use dns_name_format() when logging queries 2000-04-11 19:24:20 +00:00
Brian Wellington
8469ee3726 Don't include authority data if it would force us to unset the AD bit 2000-04-11 18:43:27 +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
Andreas Gustafsson
66e2dd5001 wired up view options: recursion, auth-nxdomain, transfer-format 2000-04-06 20:25:48 +00:00
Andreas Gustafsson
074a4e3494 provide more context in log messages 2000-04-04 19:14:05 +00:00
Bob Halley
d72c8b8c6a Do not detach 'db' in the NOTFOUND case if it is NULL. This should not
happen, but is a possible result if the resolver returned NOTFOUND.
2000-03-17 00:07:02 +00:00
Andreas Gustafsson
3eef7eaba0 renamed dns_acl_checkrequest() to ns_client_checkacl()
and moved it to bin/named/client.c to reflect the fact that it
implemented BIND ACL policy more than general-purpose library
functionality; resolve ACL defaults at configuration time
rather than when the ACL is evaluated
2000-02-22 21:24:24 +00:00
Brian Wellington
52c6910afb Adding additional data caused an assertion for a signed zone. 2000-02-14 22:21:25 +00:00
Andreas Gustafsson
ae0bc2f30e Make client reference counts work the same way as all
other reference counts: replace ns_client_wait() and
ns_client_unwait() by ns_client_attach() and ns_client_detach(),
respectively
2000-02-11 20:56:19 +00:00
Andreas Gustafsson
e5f8f2659b yet another major reorganization of client shutdown
procedures, in preparation for client timeouts
2000-02-10 22:16:56 +00:00
Andreas Gustafsson
a174757026 implemented the 'localhost' and 'localnets' ACLs 2000-02-09 22:59:40 +00:00