Commit Graph

31 Commits

Author SHA1 Message Date
itojun c8c092ff17 do not try to transmit UDP DNS query forever, in EINTR-busy situation.
the change uses extra variables which can be avoided,
it is to make the change look similar to BIND8 change.
question: timeout resolution is 1 second (time_t).  should we use
timevals instead?

PR 6410 From: maximum entropy <entropy@venom.bernstein.com>
2000-07-27 00:35:02 +00:00
christos 1c3b369611 add explicit casts
elide non-portable casts
2000-07-06 03:01:32 +00:00
itojun 35d0fb470c do not assume that nsaddr_list[n].sa_len is properly initialized,
there can be some third-party code that does not.
2000-06-18 21:41:23 +00:00
itojun b3d17a6362 besure to check getnameinfo() return value. (debugging code) 2000-06-14 01:52:41 +00:00
itojun d585d4d8d9 simplify #ifdef a bit, by assuming getnameinfo. 2000-04-26 10:55:53 +00:00
itojun 393bcd0129 sync with BIND 4.9.7. reject too short messages. 2000-04-25 13:46:10 +00:00
itojun 0635beac21 cleanup nsaddr_list handling.
- be more backward compatible with apps that update _res.nsaddr_list[n].
- allow scoped IPv6 addresses in /etc/resolv.conf (like fe80::1%lo0).
- simplify #ifdefs.
2000-04-25 08:51:39 +00:00
mycroft 0b92a50dc3 Delint some more. 2000-01-23 01:55:17 +00:00
mycroft 0463795134 Delint. 2000-01-22 23:37:14 +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
mycroft 9f5f4ac699 Make some needed weak aliases. 1999-08-17 03:58:39 +00:00
itojun db0f8786bd if the list of name server on /etc/resolv.conf is in a
non-supported AF, try the next nameserver instead of abort.

This helps situations like:
- you write IPv6 nameserver into /etc/resolv.conf and
- run non-IPv6 kernel
1999-07-04 03:52:55 +00:00
itojun e24b45d811 IPv6 DNS transport support for resolver.
Now you can write
	nameserver 3ffe:0501:4819::42
in /etc/resolv.conf for DNS query over IPv6 network.
(the above address is alive as DNS server)
1999-07-01 18:19:35 +00:00
christos 180ff547a4 int -> socklen_t 1999-05-03 15:26:12 +00:00
christos 38676913cd delint 1998-11-15 17:39:20 +00:00
christos 2c89343c25 delint 1998-11-13 15:46:52 +00:00
kleink 0b11c41974 Since these files are shared with parts of the BIND-4 userland (outside libc),
do the internal symbol renaming dance only if inside the libc build environment.
1998-10-14 19:33:49 +00:00
perry 198f98faf0 $Id: -> Id: (to make hunting down other bad Ids easier). 1998-01-06 05:01:16 +00:00
lukem 038f3f9a9b WARNSify if -DDEBUG 1997-10-09 11:34:15 +00:00
jtc 43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
mrg 38bfb6cd0a merge bind 4.9.6 resolver. still need to fix <resolv.h> 1997-07-20 13:33:17 +00:00
christos 8d36d3405e Fix RCSID's
Fix gcc warnings
Add missing prototypes
Use "namespace.h"
1997-07-13 19:57:30 +00:00
mrg 023690d8db merge in the bind 4.9.5-P1 resolver. we are now _mostly_ the
same as this, with our changes also included (resolv.conf and
other minor differences).
1997-04-13 10:30:29 +00:00
mycroft 041d00cdf4 It's not necessary to initialize the `revents' field of struct pollfd. 1997-02-08 04:38:02 +00:00
mrg f5e4cc118e use poll() instead of select() 1996-12-17 03:35:52 +00:00
mrg 237baea38a merge with the resolver in bind 4.9.3-P1. 1996-02-02 15:22:14 +00:00
cgd ef0582f1e7 clean up import. also convert everything to new Id format. 1995-02-25 06:20:26 +00:00
jtc 9c20f740a3 Declare rcsid strings so they are stored in text segment. 1993-08-26 00:43:03 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00