summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* fix conditionalseric2015-10-082-4/+4
| | | | ok deraadt@
* Handle case where no hint is passed in. Found as a crash of fdm by jturner@deraadt2015-10-082-4/+4
|
* getaddrinfo_async() shouldn't unconditionally intialize the resolverderaadt2015-10-073-4/+14
| | | | | | via _asr_use_resolver(). If the hint specifies for AI_NUMERICHOST, create a transient lookup context which won't try to open /etc/reslov.conf ok eric guenther
* getaddrinfo() should not res_init() unconditionally, but allow lowerderaadt2015-10-071-2/+3
| | | | | | layers to decide. The request could be AI_NUMERICHOST. [And the process could be tame()-constrained to not open /etc/resolv.conf] ok eric guenther
* Wrap <resolv.h> so that internal calls go directguenther2015-10-052-2/+4
| | | | ok millert@
* Initially eric developers asr as a side-load style library for async DNS.deraadt2015-10-032-65/+15
| | | | | | | When it was integrated as the main resolver, a bunch of strange initialization code remained. Start whittling away at this, piece by piece, to make it more clear. ok eric
* missing asr* -> _asr* symbol rename for building with debug codeeric2015-10-033-17/+17
| | | | ok jca@
* make a && && & block more readable. no binary change.deraadt2015-10-021-4/+7
| | | | discussed with otto
* remove bogus includes of err.heric2015-09-208-17/+9
|
* use _PATH_RESCONF directlyeric2015-09-201-3/+2
|
* remove unused static functioneric2015-09-201-18/+1
|
* Wrap <asr.h> so internal calls go direct and all the symbols are weakguenther2015-09-148-9/+22
|
* Finish wrapping <netdb.h> so that calls go direct and the symbols are all weakguenther2015-09-144-4/+9
|
* Hide all unnecessary asr / resolver related API with _ prefixes.deraadt2015-09-0913-316/+224
| | | | direction & ok guenther
* Use SOCK_NONBLOCK in a couple more placesguenther2015-09-091-11/+3
| | | | ok deraadt@
* use _PATH_RESCONFderaadt2015-09-021-2/+2
|
* Fix test against INADDR_LOOPBACKjca2015-08-161-2/+2
| | | | ok gilles@
* Rename print_sockaddr() to avoid symbol visibility problemsjca2015-06-203-8/+8
| | | | | | print_sockaddr is internal to asr, and conflicts with ports/net/samba4. ok eric@
* make sure to check for resolv.conf update the first time the resolvereric2015-06-042-2/+11
| | | | | | is used after pid has changed. ok deraadt@
* fix a possible off-by-one when reading /etc/hosts if it doesn't enderic2015-05-295-13/+20
| | | | | | with a newline. ok jca@
* simply use _PATH_HOSTS where appropriateeric2015-05-265-13/+7
|
* Kill outdated comment.jca2015-05-251-2/+2
| | | | ok eric@
* Skip search domains iteration if RES_DNSRCH and/or RES_DEFNAMES is unset.eric2015-05-252-4/+13
| | | | | prodded by Brad ok jca@
* getnameinfo(3) doesn't need to initialize the resolver when it's only usederic2015-05-251-1/+150
| | | | | | for address/port formatting (e.g. NI_NUMERICHOST). ok deraadt@ jca@
* AI_ADDRCONFIG: skip loopback addresses, not loopback interfaces.jca2015-05-051-4/+10
| | | | | | | This is what RFC3493 suggests. Fixes AI_ADDRCONFIG on setups where global addresses are configured only on loopback interfaces. Discussed with and ok eric@ gilles@
* Move the AI_ADDRCONFIG setup to its own function.jca2015-05-051-18/+41
| | | | Input from and ok gilles@ eric@
* gethostbyname(3) would fail when more than 16 addrs/aliases were returned.brynet2015-03-021-7/+7
| | | | | | | | | Bump MAXADDRS/ALIASES to the original of 35, and silently ignore extras instead of failing. Noticed by markson on freenode. OK eric@ "with revised diff", phessler@.
* Limit AI_ADDRCONFIG effects to DNS queries.jca2015-02-142-18/+19
| | | | | | | | | This is what RFC 2553 initially described, sadly RFC 3493 stopped limiting scope to DNS. This can result in nonsensical failures with loopback addresses, link-local addresses, raw addresses and /etc/hosts entries. with and ok eric@ sperreault@
* fix a possible NULL-deref when trying to deref ifa->ifa_addrgilles2015-01-301-1/+3
| | | | ok eric@
* Move to the <limits.h> universe.deraadt2015-01-164-5/+8
| | | | review by millert, binary checking process with doug, concept with guenther
* change _yp_domain[] to HOST_NAME_MAX+1, and re-arrange those who includederaadt2015-01-142-14/+18
| | | | it to get limits.h early enough
* Nuke some obvious #include duplications.krw2014-11-181-2/+1
| | | | ok espie@ deraadt@ millert@ tedu@
* Fix a NULL deref when getting an actual result for an invalid hostnameeric2014-11-022-10/+9
| | | | | | in gethostbyname(). Similar fix for getnetbyname(). ok deraadt@ daniel@ jca@
* When fopen()ing internal to libc (the API doesn't support the useguenther2014-09-154-9/+9
| | | | | | | of the resulting FILE *), then pass fopen() the 'e' mode letter to mark it close-on-exec. ok miod@
* Use _PATH_NETWORKS for "/etc/networks"guenther2014-09-151-2/+2
| | | | ok miod@
* Make queries using the search list for hostname lookups fail witheric2014-07-234-5/+31
| | | | | | | | | | NO_DATA/EAI_NODATA when the hostname param is an empty string. So far, they were using the entries in the search list with no additional component, which is not really expected. reported by jsing@ and a few others ok deraadt@, "makes sense" jsing@
* skip incomplete entries in /etc/hosts and /etc/networkseric2014-05-132-2/+10
| | | | | | fix null deref spotted by Seth Hanford, pinpointed by dtucker@ ok florian@
* remove warning by adding explicit parentheses around && within ||chl2014-05-101-4/+4
| | | | ok sperreault@
* Implement AI_ADDRCONFIGsperreault2014-04-281-2/+39
| | | | | | | | | | | | | | | | | | | | This is a getaddrinfo() flag that is defined thusly in RFC 3493: If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be returned only if an IPv4 address is configured on the local system, and IPv6 addresses shall be returned only if an IPv6 address is configured on the local system. The loopback address is not considered for this case as valid as a configured address. For example, when using the DNS, a query for AAAA records should occur only if the node has at least one IPv6 address configured (other than IPv6 loopback) and a query for A records should occur only if the node has at least one IPv4 address configured (other than the IPv4 loopback). The flag is set by default when hints is NULL. ok Eric Faurot, Jason McIntyre
* Don't default enable the debug functionality with its unprotected getenv().guenther2014-04-171-5/+1
| | | | ok eric@ sthen@ deraadt@
* Make the asr API public. Install asr.h to /usr/include.h and manpages.eric2014-03-2622-158/+93
| | | | | | Include tweaks suggested by mpi@ ok deraadt@
* update manpageeric2014-03-261-137/+81
|
* Cleanup and simplify the API to be exposed. Use better names foreric2014-03-2518-254/+251
| | | | | | structures, functions and defines. discussed with and ok deraadt@ guenther@
* prefix structure names to avoid ambiguity and possible collisions wheneric2014-03-148-94/+94
| | | | | | the API gets public. ok deraadt@
* fix support for HOSTALIASES.eric2014-03-031-14/+12
| | | | | reported by tedu@ ok tedu@ deraadt@
* need more #include files for resolv.h, for the non-YP case, which happensderaadt2014-02-261-1/+3
| | | | | on the install media... ok eric
* Do not restrict chars in dname during label expansion, but validate resultingeric2014-02-264-17/+16
| | | | | | hostnames before returning them to the caller. ok deraadt@
* make res_search() report NO_DATA instead of HOST_NOT_FOUND in some cases.eric2014-02-241-2/+2
| | | | | | issue reported by matthieu@ ok matthieu@ deraadt@
* Better search strategy for getaddrinfo. The address family loop musteric2014-02-171-14/+161
| | | | be done "inside" the search domain loop, not the other way round.
* report extra PTR records as aliaseseric2014-02-171-3/+2
|