Commit Graph

14 Commits

Author SHA1 Message Date
itojun 1501f61891 bring in latest KAME get{addr,name}info(3).
getnameinfo(3) globs ai_socktype and ai_protocol correctly.
KAME scopeid extension is implemented.
(draft-ietf-ipngwg-scopedaddr-format-00.txt)

bump up shlib minor
(may not be necessary, but rather big difference in behavior - especially
ai_flags)
1999-12-13 14:18:31 +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
kleink 5f3726439e Need "namespace.h". 1999-08-22 12:54:02 +00:00
itojun 94c4bdf1cc pacify too-picky compiler.
From: onoe@sm.sony.co.jp
1999-08-13 09:45:51 +00:00
itojun f958dccbd1 - do not make query for AFs that are not supported by kernel.
i.e. do not make query for IPv6 addresses, when running on non-IPv6 kernel,
  or, do not query for IPv4 address on IPv6-only kernel :-)

  This kind of behavior is not very well documented in RFC2553.  This
  may violate the spec.

- on EAI_AGAIN, only retry 3 times (3 is a magic number).  Previous code
  made retries forever.  This solves situation where name server is wrongly
  configured and nameserver:53 returns icmp port unreach.

The only proper fix for all getaddrinfo() related twists would be to
implement getipnodebyname() and get rid of wacky get_addr().
We need to contribute bind8 development for this.
1999-07-14 22:10:03 +00:00
itojun 2842a2f6bb fix name resolution problem when you have "hosts: files dns" on
/etc/nsswitch.conf.

This was because of two reasons:
- /etc/hosts lookup code damaged some of internal
  state used by gethostbyname2().
- getaddrinfo() was not persistent enough against errors.

Sorry for the delay, and hope this fix all the following PRs
(I checked in my environment immitating those PRs and it worked for me)
PR: 7901, 7912, 7921
1999-07-06 02:00:41 +00:00
lukem abd1f8ab5b capitalize the first word of most error strings except those words that are
argument names to the function. e.g, if `const char *servname' is an argument
name, keep using "servname invalid [...]" instead of "Servname invalid [...]"
1999-07-04 02:02:29 +00:00
itojun 4620b00436 add NetBSD RCSID on top. 1999-07-04 00:43:43 +00:00
itojun d505f1145c fix USE_GETIPNODEBY case. 1999-07-04 00:34:20 +00:00
itojun f69724e659 fix behavior when there's dangling CNAME on specific AF.
TODO: have getipnodeby{name,addr} and let them do the trick.
1999-07-04 00:33:14 +00:00
itojun a45fa8f3c7 improve lint friendliness on USE_GETIPNODEBY case.
(no change in behavior)
1999-07-03 14:29:29 +00:00
lukem b8e9b3ff69 remove trailing `.' on error messages, since messages from strerror() and
h_strerror() don't return messages with a trailing `.' (and the `.' looks
ugly when using warnx() with the error message).
1999-07-03 07:00:42 +00:00
itojun 37e8159125 add IPv6 support functions.
get{addr,name} info are implemented to have as little impact to existing
resolver code as possible, so they are NOT the optimal implementation.
They are at this moment not very thread safe (as they call
gethostby{name,addr}).

(shlib minor version)++, as new interfaces are added.

TODO: getipnodeby{name,addr} - which needs total reimplementation of
gethostby{name,addr}.
upgrade rcmd.c for multiple af support (needed for IPv6-ready rsh/rlogin)
1999-07-01 18:23:53 +00:00