about summary refs log tree commit diff
path: root/src/network/lookup_ipliteral.c
Commit message (Collapse)AuthorAgeFilesLines
* avoid attempting to lookup IP literals as hostnamesRich Felker2015-09-251-27/+32
| | | | | | | | | | | | | | | | previously, __lookup_ipliteral only checked its argument against the requested address family, so IPv4 literals passed through to __lookup_name if the caller asked for only IPv6 results, and likewise for IPv6 literals when the caller asked for only IPv4. this resulted in spurious DNS lookups that reportedly even succeeded with some nameservers. now, __lookup_ipliteral attempts to parse its argument as both IPv4 and IPv6, and returns an error (to stop further search) rather than 0 (no results yet) if the form of the argument mismatches the requested address family. based on patch by Julien Ramseier.
* fix uninitialized scopeid in lookups from hosts file and ip literalsTimo Teräs2015-09-111-2/+2
|
* fix missing function declarations in refactored ip literal parsing codeRich Felker2014-06-051-0/+1
|
* add support for reverse name lookups from hosts file to getnameinfoRich Felker2014-06-041-0/+51
this also affects the legacy gethostbyaddr family, which uses getnameinfo as its backend. some other minor changes associated with the refactoring of source files are also made; in particular, the resolv.conf parser now uses the same code that's used elsewhere to handle ip literals, so as a side effect it can now accept a scope id for nameserver addressed with link-local scope.