summaryrefslogtreecommitdiff
path: root/src/network/lookup_ipliteral.c
AgeCommit message (Collapse)AuthorFilesLines
2015-09-25avoid attempting to lookup IP literals as hostnamesRich Felker1-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.
2015-09-11fix uninitialized scopeid in lookups from hosts file and ip literalsTimo Teräs1-2/+2
2014-06-05fix missing function declarations in refactored ip literal parsing codeRich Felker1-0/+1
2014-06-04add support for reverse name lookups from hosts file to getnameinfoRich Felker1-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.