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.
functions, with a little bit of a caution that the page rounding
behavior isn't mentioned in standards documents that mention brk/sbrk.
Klaus removed this before, but I'm not sure why, and I've been unable
to reach him about the matter after trying for several days. The
information about the behavior has always been in the page and is
important for developers to know about.
issues (at least):
1) sbrk is defined as returning char *, which violates XPG
2) I'm not clear on what happens if you try to sbrk() on a negative
incr that is less than the page size. I'm guessing "nothing", but we
should document this behavior.
3) XPG says some interesting things about whether new pages are
guaranteed zeroed. We say nothing about this. We should document our
behavior.
4) It isn't clear if *we* guarantee that malloc and sbrk can be mixed
in our API (I've documented that it isn't universally portable.)
We really should clean these up, too.
/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
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
argument names to the function. e.g, if `const char *servname' is an argument
name, keep using "servname invalid [...]" instead of "Servname invalid [...]"
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)
This means the stack frame and program counter can restored directly
from the jmp_buf, eliminating the need to backtrack through frames
which does not work in all cases.