Commit Graph

40 Commits

Author SHA1 Message Date
wiz 4824190751 transmission, not transmition. 2003-01-06 13:17:01 +00:00
itojun 463bfdcd98 use strlcpy where appropriate 2002-08-02 07:50:35 +00:00
itojun 0c63dd3cf2 correct %d/%u mixup. 2002-06-27 10:22:07 +00:00
itojun 5996ba4042 make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.
don't connect datagram socket if RES_INSECURE1.
needed to implement IPv6 anycast UDP DNS queries as documented in
<draft-ietf-ipngwg-dns-discovery-02.txt>.
sync with kame.
2001-09-13 11:05:02 +00:00
itojun babc498cc8 implement EDNS0 support, as EDNS0 support will be made mandatory for
IPv6 transport-ready resolvers/DNS servers.  need careful configuration
when enable it. (default config is not affected).
see manpage for details.

XXX visible symbol __res_opt() is added, however, it is not supposed to be
called from outside, libc minor is not bumped.
2000-08-09 14:40:52 +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 bc44f19756 add explicit casts
elide non-portable casts
2000-07-06 03:00:16 +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 75753d9452 sync with BIND 4.9.7. mostly costmetic.
XXX 4.9.5 -> 4.9.7 moves _res from data to bss.  the bss version of the code
is committed, but is wrapped with #ifdef __RES_IN_BSS and is disabled
(_res is still in data segment).
2000-04-25 13:57:08 +00:00
itojun 25855cd3a5 correct a use of sizeof() against nsaddr_list. 2000-04-25 08:56:06 +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 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
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 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 4620b00436 add NetBSD RCSID on top. 1999-07-04 00:43:43 +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
lukem 2bf40fa435 pull nsswitch up to main branch
convert getnetby*() to nsswitch (from resolv.conf lookup)
1999-01-16 07:48:23 +00:00
christos 2c89343c25 delint 1998-11-13 15:46:52 +00:00
kleink a292d8ec80 (bcmp(), bcopy(), bzero()) -> (memcmp(), memcpy(), memset()) 1998-10-15 10:22:23 +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
kleink 886f927ec6 Need internal names for res_init(), res_mkquery(), res_query() and res_search(). 1998-10-14 19:13:01 +00:00
mrg 32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
perry b2e2f28353 add sys/time.h include 1998-02-02 22:36:15 +00:00
perry 198f98faf0 $Id: -> Id: (to make hunting down other bad Ids easier). 1998-01-06 05:01:16 +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 3a4d449e5b use a nul not '0'. from <enami@ba2.so-net.or.jp> in PR#3558 1997-04-30 07:02:18 +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
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
mrg 237baea38a merge with the resolver in bind 4.9.3-P1. 1996-02-02 15:22:14 +00:00
mycroft c7ad9c47f1 Fill in sin_len. 1995-06-03 22:24:45 +00:00
cgd ef0582f1e7 clean up import. also convert everything to new Id format. 1995-02-25 06:20:26 +00:00
deraadt 2343dc8f90 u_int_{16,32}_t stuff 1994-10-15 07:56:51 +00:00
deraadt bc93d2c77e new resolver. changes from 4.9.2 by <paul@vix.com>, as well as a number
of features and optimizations by myself.
1994-04-07 06:58:29 +00:00
deraadt 7b729d55a0 support for lookup keyword in resolv.conf 1994-01-28 03:10:35 +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