Commit Graph

73 Commits

Author SHA1 Message Date
christos efba316dcc Appropriate versions are not supplied by bind anymore. 2007-01-27 22:27:35 +00:00
christos d73eb73dc8 merge in resolver portion of bind-9.4.0-rc2 2007-01-27 22:26:43 +00:00
christos ce2c90c7c1 fix incomplete initializers 2006-10-15 16:14:46 +00:00
christos bd4761ac59 Coverity CID 2279: Plug memory leak. 2006-03-22 00:03:51 +00:00
christos c882076269 Coverity CID 2280: Plug memory leak. 2006-03-22 00:03:00 +00:00
christos 90d0f8cfa0 PR/32616: Yves-Emmanuel JUTARD: Fix compilation with -DDEBUG 2006-01-24 17:29:33 +00:00
tsarna 064cb14faa Rest of fix for PR#31184: getaddrinfo() now honors resolv.conf sortlist
directive for dns answers.

Also, unifdef the RESLVSORT (non-)option sillyness.

Reviewed by christos.
2005-09-15 23:33:41 +00:00
tsarna 083c291209 Re-enable resolv.conf sortlist support in gethostbyname().
Fixes first part of PR#31184.  addrsort() was not exposed to the rest of
libc as it turns out not to be usable for getaddrinfo(), so a different
sorter will be implemented for that.
2005-09-15 15:25:40 +00:00
lukem 178e201b11 appease gcc -Wuninitialized 2005-06-01 04:38:40 +00:00
lukem 98a47ed075 Fix gethostent(3) (which was reenabled in rev 1.63) so that it actually
works by allowing _gethtent() to treat host.h_addrtype==0 && host.h_length==0
as "any address family" when parsing.
2004-11-23 03:42:13 +00:00
ginsbach 30ef75e3f4 Restore gethostent() as a supported interface. Yes, it maybe obsolete
but it is specified by IEEE Std 1003.1, 2004 Edition (POSIX) and
the X/Open standards (Issue 6 and XNS 5.2).

* revert change removing gethostent() from gethostbyname(3) man page
* delete kruft from gethnamaddr.c leaving only gethostent() as a
  wrapper around _gethtent().
* revert recent changes to <netdb.h>
  + restore gethostent() prototype
  + restore freehostent() prototype; handle similar to non-shipped
    getipnodby*() prototypes
  + use correct XOPEN_SOURCE version (520 not 500) for freeaddrinfo()
    prototype; interface specified by XNS5.2 not XNS5

Reviewd by <christos> and <drochner>.
2004-08-17 02:29:56 +00:00
itojun 588f60ad8b now that e.f.f.3.ip6.arpa is ready, we no longer need to query ip6.int 2004-07-21 03:16:29 +00:00
ginsbach 9fcbc1ee6b Change remaining K&R style function definition to ANSI; Reviewd by <christos>. 2004-06-04 20:05:25 +00:00
christos 13cc3543b5 centralize res_*init() calls in __res_get_state() 2004-05-23 16:54:12 +00:00
christos d14c1915e0 Finish bind9 resolver merge. 2004-05-21 02:30:03 +00:00
enami f431b58f2b Back out rev. 1.56; `pointer points the byte just after the valid region'
is normal case.  If the parser wants something more, there should be
another bounds check for it.
2003-10-11 03:35:42 +00:00
itojun f462c5301e paren around macro arg 2003-10-03 22:04:44 +00:00
itojun d26799ebc9 off-by-one. from millert@openbsd 2003-10-03 22:04:03 +00:00
agc eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
itojun 6a95da7f05 bound copies 2003-05-17 01:36:03 +00:00
thorpej fd128e9fb6 Fix signed/unsigned comparison warnings. 2002-11-11 16:50:34 +00:00
itojun 62f36ff8e2 allocate 64K recieve buffer for DNS responses. 2002-08-27 08:50:49 +00:00
itojun 949583590f drop AAAA reply with IPv4 mapped address. sync w/kame
draft-itojun-v6ops-v4mapped-harmful-00.txt
2002-08-22 16:32:14 +00:00
itojun 4005a5250f set h_errno properly if internal string manipulation fails. 2002-08-16 21:54:00 +00:00
itojun 5c323232e7 eliminate sprintf, use snprintf. check strlcat error. 2002-08-16 11:30:28 +00:00
itojun 0c0bf329c4 query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152. 2002-07-29 10:01:58 +00:00
itojun 0c4fb2c7e1 correct DIAGASSERT 2002-06-26 09:39:48 +00:00
itojun 092b3bc66a avoid remote buffer overrun on hostbuf[]. From: Joost Pol <joost@pine.nl>
correct bad practice in the code - it uses two changing variables
to manage buffer (buf and buflen).  we eliminate buflen and use
fixed point (ep) as the ending pointer.

this fix is critical.
2002-06-26 06:00:07 +00:00
itojun fb40d48413 do not pass uninitialized variable to nsdispatch(). 2002-06-26 02:40:46 +00:00
wiz e3e4fede44 __STDC__ is always defined on NetBSD. 2002-05-26 14:48:19 +00:00
itojun 6a3445b8a3 be picky about string manipulation in reverse lookups 2002-05-22 02:39:15 +00:00
itojun 449d6afcab style 2002-05-18 00:07:28 +00:00
itojun c37fca45ce do not reverse-lookup scoped IPv6 address. it does not make sense as
there's no way to give scope identifier.  sync w/kame
2002-05-17 22:40:31 +00:00
kleink 91491e8dda Change the `len' arguemtn to gethostbyaddr(3) from int to socklen_t in
accordance with XNS5.2; fixes PR standards/12703.
2001-04-26 12:55:31 +00:00
christos 663f790f35 remove redundant declarations. 2000-12-20 20:51:08 +00:00
sommerfeld 4c38fc5aac Varargsify dprintf to allow for format string checking 2000-10-04 14:56:24 +00:00
itojun 698d9a8d8b on gethostby* with NIS backend, make a lookup against ipnodes.{byname,byaddr}
for non-IPv4 address.  obeys solaris8 practice.

XXX does not support scoped address extension, as gethostby* are not
scope-aware.  always use getaddrinfo/getnameinfo.
XXX it is not very useful at this moment, if you define multiple entries for
single hostname.  see PR 10713 for detail.
2000-07-30 03:01:01 +00:00
itojun 31089a149f plug host_addrs overrun. rogue NIS server can transmit tons of lines,
effectively overrun host_addrs buffer.
2000-07-30 02:44:36 +00:00
itohy 7daefc5a5a Passing "char" values to ctype(3) functions is problematic.
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.

The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems.  On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems.  However, we leave the isascii()
untouched for now, so as not to change the current behavior.
2000-07-07 08:03:36 +00:00
christos 5570317afb add CONSTCOND where appropriate 2000-07-06 02:52:07 +00:00
tron b4969ca513 Fix an alignment problem introduced by the patch for PR lib/8032.
Fixes PR lib/10048 by J.T. Conklin.
2000-05-23 07:03:10 +00:00
itojun e1e1e8e6ba sync with BIND 4.9.7. strict boundary checking. 2000-04-25 13:47:38 +00:00
christos e904ed8773 Try to silence some of the lint warnings. Unfortunately we cannot fix
them all right now until we fix the ALIGN() macro to return u_long in
all the ports.
2000-04-02 21:31:54 +00:00
mycroft c6a0f46b4f Delint. 2000-01-22 22:53:59 +00:00
mycroft 605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19:07 +00:00
assar 8f5685ec6b ignore KEY and SIG records when matching responses to the query. we
get those as extras from DNSsec-enabled name servers.
1999-12-28 15:47:41 +00:00
lukem 0e4f2591aa change default nsswitch.conf entry for `hosts' from:
hosts: dns files
to
	hosts: files dns

this should speed things up a lot at boot if hostnames that are in
/etc/hosts are used for ifconfig, route, etc.
1999-10-24 12:36:02 +00:00
lukem d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
itojun daa44a5758 do not make reverse query against IPv6 unspecified, or loopback addresses.
From: ume@mahoroba.org
1999-08-09 15:00:14 +00:00